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. Help!

Posted by Kooldino, 07-17-2009, 05:10 PM
I tried following the steps on this page: http://www.fasthostinghelp.com/inval...-flag-t6.html? 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 register_globals=1 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: http://forums.oscommerce.com/lofiver...p?t292607.html

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 /home/cpeasyapache/src/php-5.2.10/php.ini-dist /home/cpeasyapache/src/php-5.2.10/php.ini-recommended /scripts/php.ini /usr/lib/php.ini /usr/local/cpanel/3rdparty/etc/php.ini /usr/local/cpanel/3rdparty/etc/php.ini,v /usr/local/cpanel/3rdparty/etc/php.ini.dist /usr/local/cpanel/3rdparty/etc/php.ini.keep /usr/local/cpanel/3rdparty/etc/horde/php.ini /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini /usr/local/cpanel/3rdparty/etc/phppgadmin/php.ini /usr/local/cpanel/3rdparty/etc/roundcube/php.ini /usr/local/cpanel/3rdparty/lib/php.ini,v /usr/local/lib/php.ini /usr/local/lib/php.ini,v /usr/local/lib/php.ini-zend_optimizer.bak

Posted by Kooldino, 07-17-2009, 06:03 PM
friggin' A - http://support.za-dns.com/index.php?...kbarticleid=36 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.)

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
WHMCS work (Views: 233)
Auto Forum Installer (Views: 255)
Decision Help (Views: 253)