|
Posted by NC on 11/18/10 11:40
Don wrote:
>
> I did a php script and tested with the browser by giving the full
> path of script as URL under a domain name (ex :
> http://www.AAA-tech.com/TEST/myScript.php), 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/AAA-tech.com/public/www/TEST/myScript.php</b>
> on line <b>80</b><br />
>
> <b>Fatal error</b>: Call to undefined function: imagegif() in
> <b>/web/Xv/Xe/Xm/AAA-tech.com/public/www/TEST/myScript.php</b>
> on line <b>86</b><br />
>
> Apparently, the interpretor /usr/local/bin/php is not the same version
> as php server.
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...
> My question is :
> How can I launch my php script by calling the php server
> to interpret it correctly?
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 -?.
Cheers,
NC
Navigation:
[Reply to this message]
|