Portal Home > Knowledgebase > Articles Database > Internal Server Error - Invalid command 'php_value'
Internal Server Error - Invalid command 'php_value'
|Posted by Kooldino, 07-17-2009, 04:59 PM|
|I just went to log on to my site and noticed that I have an "Internal Server Error". I checked the cpanel error log and found:
/home/foo/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration,
Last night, one of my admins updated php to use suPHP...I guess it broke this.
|Posted by Kooldino, 07-17-2009, 05:10 PM|
|I tried following the steps on this page:
But either I didn't do it right or it's not working.
I made a php.ini file with two lines in it:
php_flag register_globals on
I then copied this file to a few subdirectories, but I'm not sure if it's working or where exactly they need to go...
|Posted by Kooldino, 07-17-2009, 05:17 PM|
|More stuff that didn't work:
|Posted by Kooldino, 07-17-2009, 05:50 PM|
|In theory, since he just installed suPHP, setting register_globals = On in php.ini in that subdirectory should do it, but it's not...
|Posted by Kooldino, 07-17-2009, 05:57 PM|
|Also, which of these php.ini files is the REAL one?
# locate php.ini
|Posted by Kooldino, 07-17-2009, 06:03 PM|
|friggin' A -
turns out I had to remove the php_values flags in my .htaccess files before my php.ini tweaks would work.
|Posted by fazaha, 07-17-2009, 06:49 PM|
|remove php_flag adn everything will be ok
|Posted by WHR-Abner, 07-18-2009, 12:34 AM|
|The php_flags and php_values should never be set in .htaccess if you use SuPHP PHP handler.
There are other pre-requisites too for enabling suPHP. A failure to set these may result in Internal Server Errors.
For checking the desired suPHP configuration, follow the instructions at http://www.v-nessa.net/2007/06/05/in...uphp-on-cpanel
|Posted by mugo, 07-18-2009, 12:40 AM|
|Man, I'd flog the admin that upgraded php and didn't test it.... that's no good.
|Posted by prashant1979, 07-18-2009, 02:50 AM|
|If you have suPHP enabled, then you cannot use php_value in .htaccess file. You have to upload a custom php.ini file in the home directory of the website and modify any settings required.
|Posted by Kooldino, 07-20-2009, 09:21 AM|
|Yup, I had that all sorted in one of my first posts. The problem was that none if it would work until I removed everything from my .htaccess file (as I posted above in the "friggin a" post.)
Add to Favourites Print this Article
WHMCS work (Views: 233)
Decision Help (Views: 253)