[PHP] Re: How to extract php source code from joomla

2013-07-23 Thread Tedd Sperling
On Jul 23, 2013, at 12:15 AM, elk dolk  wrote:

> I study for MSc degree at university.
> 
>  Are you in an advanced class?

Ok, congratulations -- you are studying for an MSc -- but that didn't answer 
the question.

So, let me repeat the question:

[1] "Are you in an advanced PHP class?"

[2] "Or is this just an introductory class?"


If [1], then the coursework might be understandable, but still very difficult.

If [2], that is far more than what I teach as an "Introduction to PHP" course.


tedd

_
tedd.sperl...@gmail.com
http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] /tmp/directory

2013-07-23 Thread Daniel Brown
On Mon, Jul 22, 2013 at 10:10 PM, Tedd Sperling  wrote:
> On Jul 22, 2013, at 4:10 PM, Matijn Woudt  wrote:
>
>> On Mon, Jul 22, 2013 at 5:20 PM, Tedd Sperling  wrote:
>>
>>> Hi gang:
>>>
>>> I should know this, but I don't.
>>>
>>> Where is the /tmp/ directory?
>>>
>>> You see, I have a client where his host has apparently changed the /tmp/
>>> directory permissions such that old php/mysql scripts cannot write to the
>>> /tmp/ directory anymore -- they did at one time.
>>>
>>> So, how do I fix it?
>>>
>>> Cheers,
>>>
>>> tedd
>>>
>>>
>> Switch host? /tmp is required by the FHS and POSIX standards (writable for
>> any user), any host changing that should have no customers.
>>
>> - Matijn
>
>
> Good point -- we will add that reason to the many other reasons why we are 
> changing host.
>
> Keep in mind, the installed software worked for nearly a decade and now the 
> host has changed something that caused this error, but the current host 
> doesn't seem to know what happened.

If it's /tmp, it's /tmp.  The leading slash indicates that it's in
the filesystem root.  However, if it's just tmp, then it could - and
probably is - under the client's home directory.  Unless they're
chrooted; then it could be displayed as /tmp, but would actually be
virtualized by the OS, where /tmp isn't really /tmp, but could be
/var/virtfs/user/tmp.

Confusing?  Sure.  Off-topic for the list?  Sort of, but that's
easy enough to change.

Since you can't use get_sys_temp_dir() on 4.3.10, you should
instead see if $_ENV contains an array key for TMP, TMPDIR, or TEMP.
Or, if you'd rather, you can use getenv('TMP') and the like.  It
doesn't mean that you'll get any useful information back (or anything
at all, necessarily), but it's another thing to try when using such an
antiquated version (I believe it was released at the end of 2004).

--

Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to extract php source code from joomla

2013-07-23 Thread Yoinier Hernandez Nieves

El 22/07/13 15:49, elk dolk escribió:

Thank you for the quick response ! What I am trying to do : I have to complete 
two university projects for

  my professor !

project One  : Make an online shop and must use the following components in it


Shopping cart, Catalog of products, payment gateway , user login and user 
activity log .

You can use Prestashop, Magento, Oscommerce, etc, and modify at you're 
needed.


project Two : Implementing of a B2B sell-side portal with negotiation mechanism.


You can modify above softwares to this purpose.

Thanks

As I am familiar with php and My.SQL and I have only 20 days to complete those 
projects !  I thought it's
(...)

Thanks,
Ash
http://www.ashleysheridan.co.uk




--
_.___.  .__
\__  |   |  |__| ___  __    __
 /   |   |/\|  |/ __ \  \/ // __ \ /  ___/
 \   |   |  \  \  ___/\   /\  ___/ \___ \
 / __|___|  /__|\___  >\_/  \___  >  >
 \/   \/\/  \/ \/
.___  __   ___  __
  __| _/_/  |_ \  \   _/  |_
 / __ |/  _ \   __\/   |   \_/ __ \   __\
/ /_/ (  <_> )  | /|\  ___/|  |
\ |\/|__| \|__  /\___  >__|
 \/   \/ \/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Foreach and mydql_query problem

2013-07-23 Thread Karl-Arne Gjersøyen
It works now and it was a php thing.When I combine a for and while loop
together with Limit in my query it works.
Karl

mandag 22. juli 2013 skrev Liam følgende:

> Shouldn't $_POST['number_of_itemsi'] be $_POST['number_of_items']
>
>
> Kind Regards,
>
> Liam.
> 3Sharp Ltd.
>
> T: 0845 6018370
> F: 0845 6018369
>
> -Original Message-
> From: Karl-Arne Gjersøyen [mailto:karlar...@gmail.com ]
> Sent: 22 July 2013 12:39
> To: PHP Mailinglist
> Subject: Re: [PHP] Foreach and mydql_query problem
>
> 2013/7/22 Tamara Temple >
>
> >
> > On Jul 22, 2013, at 1:19 AM, Karl-Arne Gjersøyen 
> > 
> >
> > wrote:
> >
> > > Hello again.
> > > I have this this source code that not work as I want...
> > >
> > > THe PHP/HTHML form fields is generated by a while loop and looks like
> > this:
> > >
> > > " required="required">
> > >
> > >
> > > the php source code look like this:
> > >  > > if(!empty($_POST['number_of_itemsi'])){
> > >include('../../connect.php');
> > >
> > >foreach($number_of_items as $itemi){
> > >echo "$itemi";
> > >
> > >$sql = "UPDATE item_table SET number_item = '$item' WHERE
> date
> > > = '$todays_date' AND sign = '$username'";
> > >mysql_query($sql,$connect) or die(mysql_error());
> > > }
> > > }
> > >
> > > ?>
> > >
> > > The problem is:
> > > Foreach list every items as expected in PHP doc and I thought that $sql
> > and
> > > mysql_query should be run five times when I have five items.
> > > But the problem is that only the very last number_of_items is written
> > when
> > > update the form..
> > > I believe this is becayse number_of_items = '$item in $sqk override
> every
> > > earlier result.
> > >
> > > So my querstion is. How to to update the database in this case?
> > >
> > > Thanks again for your good advice  and time to help me.
> > >
> > > Karl'
> >
> > Either the code you posted isn't the actual code, or if it is, the errors
> > should be rather obvious. Post *actual* code.
> >
> >
>
> // The acutual source code is below:
> // ==
> if(!empty($_POST['antall_kolli'])){
> include('../../tilkobling.php');
>
> foreach($antall_kolli as $kolli){
> echo "$kolli";
>
> //echo $kolli. "";
> $sql = "UPDATE transportdokument SET antall_kolli_stk =
> '$kolli' WHERE dato = '$dagens_dato' AND signatur = '$brukernavn'";
> mysql_query($sql,$tilkobling) or die(mysql_error());
>  }
> }
>
> // THE PHP/HTML Form below:
> include('../../tilkobling.php');
>
> $sql = "SELECT * FROM transportdokument WHERE dato = '$dagens_dato' AND
> signatur = '$brukernavn'";
> $resultat = mysql_query($sql, $tilkobling) or die(mysql_error());
> while($rad = mysql_fetch_array($resultat, MYSQL_ASSOC)){
> $valgt_lager = $rad['valgt_lager'];
> $un_nr = $rad['un_nr'];
> $sprengstofftype = $rad['sprengstofftype'];
> $varenavn = $rad['varenavn'];
> $varenr = $rad['varenr'];
> $antall_kolli = $rad['antall_kolli_stk'];
> $adr_vekt_kg = $rad['adr_vekt_kg'];
> $varenavn = $rad['varenavn'];
> $emb = $rad['emb'];
> ?>
> 
> 
> Sprengstoff, "$sprengstofftype"; ?>
> 
> 1.1D
>  
> 
> 
> ">
> " required="required">
> 
>  size="6" value="" required="required">
> 
>  $total_mengde_kg_adr += $rad['adr_vekt_kg'];
> $total_antall_kolli += $rad['antall_kolli_stk'];
> }
>
> ?>
> include('../../tilkobling.php');
>
> $sql = "SELECT * FROM transportdokument WHERE dato = '$dagens_dato' AND
> signatur = '$brukernavn'";
> $resultat = mysql_query($sql, $tilkobling) or die(mysql_error());
> while($rad = mysql_fetch_array($resultat, MYSQL_ASSOC)){
> $valgt_lager = $rad['valgt_lager'];
> $un_nr = $rad['un_nr'];
> $sprengstofftype = $rad['sprengstofftype'];
> $varenavn = $rad['varenavn'];
> $varenr = $rad['varenr'];
> $antall_kolli = $rad['antall_kolli_stk'];
> $adr_vekt_kg = $rad['adr_vekt_kg'];
> $varenavn = $rad['varenavn'];
> $emb = $rad['emb'];
> ?>
> 
> 
> Sprengstoff, "$sprengstofftype"; ?>
> 
> 1.1D
>  
> 
> 
> ">
> " required="required">
> 
>  size="6" value="" required="required">
> 
>  $total_mengde_kg_adr += $rad['adr_vekt_kg'];
> $total_antall_kolli += $rad['antall_kolli_stk'];
> }
>
> ?>
>


-- 
Hjemmeside: http://www.karl-arne.name/


Re: [PHP] How to extract php source code from joomla

2013-07-23 Thread richard gray

On 23/07/2013 16:54, Yoinier Hernandez Nieves wrote:

El 22/07/13 15:49, elk dolk escribió:
Thank you for the quick response ! What I am trying to do : I have to 
complete two university projects for


  my professor !

project One  : Make an online shop and must use the following 
components in it



Shopping cart, Catalog of products, payment gateway , user login and 
user activity log .


You can use Prestashop, Magento, Oscommerce, etc, and modify at you're 
needed.
IMO do NOT use Oscommerce (or the ZenCart fork for that matter) ... 
unless you want a lesson in how not to write an application in PHP... 
the code and architecture is (well it was the last time I had the 
dubious pleasure of working with it...) truly awful


Rich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] /tmp/directory

2013-07-23 Thread Tedd Sperling
On Jul 23, 2013, at 9:55 AM, Daniel Brown  wrote:
>> 
> 
>If it's /tmp, it's /tmp.  The leading slash indicates that it's in
> the filesystem root.  However, if it's just tmp, then it could - and
> probably is - under the client's home directory.  Unless they're
> chrooted; then it could be displayed as /tmp, but would actually be
> virtualized by the OS, where /tmp isn't really /tmp, but could be
> /var/virtfs/user/tmp.
> 
>Confusing?  Sure.  Off-topic for the list?  Sort of, but that's
> easy enough to change.
> 
>Since you can't use get_sys_temp_dir() on 4.3.10, you should
> instead see if $_ENV contains an array key for TMP, TMPDIR, or TEMP.
> Or, if you'd rather, you can use getenv('TMP') and the like.  It
> doesn't mean that you'll get any useful information back (or anything
> at all, necessarily), but it's another thing to try when using such an
> antiquated version (I believe it was released at the end of 2004).

Thanks Daniel.

tedd


_
t...@sperling.com
http://sperling.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php