I would like to download a specific version of PHP (5.4), I use Bluehost hosting, which uses Apache and supports PHP 5.4.
I have a .htaccess and php.ini file in a subdirectory ( /api) with this line:
AddHandler application/x-httpd-php54 .phpto tell the server to use PHP 5.4.
I have /public_htmlanother htaccess that uses one php.ini file which is in this directory.
I have a file that Shell calls, with this hashbang line:
#!/usr/bin/php -c/homex/xx/public_html/api/php.ini
I looked at the PHP version at runtime (when called on a hashbang line ), it shows 5.2 (the default version), despite the fact that I pointed out to use PHP 5.4 and php.ini's use /api.
On the other hand, if I call the script a browser , used version of PHP 5.4 .
What happened? Do I need to add something else?
How can I use PHP 5.4 with my hashbang file?
I deleted the php.ini file from /apiand deleted this line from the AddHandler application/x-httpd-php54 .php.htaccess file . So the php.ini file used is the only one of /public_html.
I added this line to .htaccess from /public_html:, AddHandler application/x-httpd-php54s .phpwhich means a single php.ini file.