PHP cli from different PHP.ini
I've got a php cli script that I need to execute. However, the CLI version
of PHP isn't what I need (the script requires PHP 5.3+ and the CLI version
of PHP is only 5.2).
The host tells me I can't change the CLI version of PHP but that I can use
a the php -c switch to execute the script from another php version. The
example they gave was:
php –c /root/php/53/etc/php.ini /example/target.php
I wrote a shell script like this as a wrapper for the command:
#!/bin/bash
php –c /root/php/53/etc/php.ini /example/target.php
However, when I execute the script from the command line I get:
Status: 404 Not Found
Content-type: text/html
No input file specified.
which makes me think they gave me the path for the apache version of PHP.
Can someone explain what I should be doing here?
Thanks!
No comments:
Post a Comment