cc96ai Posted January 22, 2007 Share Posted January 22, 2007 Hi ,I m PHP 5.2.0 / Apacheand I can't access php.iniI try to update .htaccessand addedphp_value upload_max_filesize "25M"php_value post_max_size "25M"However it will give me "Internal Server Error">From the log file , i can see the error msg[Mon Jan 22 14:57:57 2007] [alert] [client 127.0.0.1]C:/work/www/Joomla-1.0.11_eCommerceEdition_VM-1.0.7/.htaccess: Invalidcommand 'php_value', perhaps mis-spelled or defined by a module notincluded in the server configuration, referer:http://joomla/administrator/index2.php?option=com_docman§ion=configso I searched on web and try again.. and update the .htaccess<IfModule mod_php5.c>php_value max_execution_time "60"php_value upload_max_filesize "25M"php_value post_max_size "25M"</IfModule>No Error msg, but nothing change.then I searched again ....updated php code - ini_set()print "b4 ".ini_get('upload_max_filesize');ini_set("upload_max_filesize" , "10M");print "<br/>after ".ini_get('upload_max_filesize');which I got the same "2M" from the php codeanyone have any idea where should I go ? is this php5 problem ?or i did something wrong ? Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 23, 2007 Share Posted January 23, 2007 I dont think you need the quotes inside the htaccess file.It should be:php_value post_max_size 25M-steve Quote Link to comment Share on other sites More sharing options...
cc96ai Posted January 30, 2007 Author Share Posted January 30, 2007 Base on the following info, i think we cannot overwrite .htaccess in PHP/CGI mode, is that correct ?http://www.phpbuilder.com/board/archive/index.php/t-95237.htmlDon't believe you can use the php_value, php_admin_value, php_flag, or php_admin_flad directives if you're runing as CGI. Those are Apache directives, but in CGI mode Apache calls the php binary, which turn reads php.ini. Since the binary doesn't read httpd.conf it has no effect on PHP. As PHP isn't loaded into Apache, Apache doesn't know what to do with the directives and borks. HTH. Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 30, 2007 Share Posted January 30, 2007 You could indeed be correct.However if I think correctly - with php running as a cgi, you can specify your own php.ini locally! Thats all I know - you will have to read up on it via google etc.-steve Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 30, 2007 Share Posted January 30, 2007 cc96ai is correct you can only use the php_value or php_flag or any of the other php_* directives in a .htaccess if PHP is loaded as an Apache Module. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.