Call php server to interpret the script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I did a php script and tested with the browser by giving the full path  
of script as URL under a domain name (ex : ), it works fine.
Then I launched the same script on the same machine (OS:Free BSD) by  
typing :

     cd ../public/www/TEST
     /usr/local/bin/php myScript.php

the result :
<b>Warning</b>:  imagecopyresampled(): requires GD 2.0 or later in  
<b>/web/Xv/Xe/Xm/</b> on line  
<b>80</b><br />

<b>Fatal error</b>:  Call to undefined function:  imagegif() in  
<b>/web/Xv/Xe/Xm/</b> on line  
<b>86</b><br />

Apparently, the interpretor /usr/local/bin/php is not the same version  
as php server.

My question is :
How can I launch my php script by calling the php server to interpret it  

Thank you in advance


Re: Call php server to interpret the script

Don wrote:
Quoted text here. Click to load it

Not necessarily; it's possible that the command-line interpreter simply
does not know where your php.ini is or lacks rights to read it...

Quoted text here. Click to load it

Run /usr/local/bin/php -i and see what extensions are enabled and what
(if any) php.ini file is used.  If the command-line interpreter does
not in fact use the same php.ini the Apache module does, you can force
it to use the correct php.ini by using the -c key.  For more
information, run /usr/local/bin/php -?.  


Site Timeline