php - .htaccess php_value display_errors settings breaks with error 500 -


i installed new xampp version 1.8.1 windows apache 2.4.3 , php 5.4.7.

none of sites working, returning http error 500 (internal server error). traced reason .htaccess line

 php_value display_errors off 

when comment it, site works. have other php_value command's works fine eq. php_value error_reporting -1.

google solution, people php must loaded dynamic shared object (dso) aka. apache module. in case (httpd-xampp.conf):

 loadfile "/xampp/php/php5ts.dll" loadmodule php5_module "/xampp/php/php5apache2_4.dll" 

so not creating problem.

i prefer solution keeps php_value display_errors off inside .htaccess file sake of other people team.

pls help

== new development ==

after commenting unrelated parts of .htaccess file using mod_expires.c , badly writen, aka. correct way put in if example:

 <ifmodule mod_expires.c>    expiresactive on    <filesmatch "\.(gif|jpg|jpeg|tif|tiff|bmp|png|js|css|ico)$">        expiresdefault "access plus 10 years"    </filesmatch> </ifmodule> 

500 error gone , php_value instructions work.

so if in similar situation comment or remove unrelated lines , try pint point problems is.

first of should

php_flag   display_errors       off 

not like

 php_value   display_errors       off 

however, our servers run php in "cgi mode" recommended php developers (not apache module), can't use "php_value" or "php_flag" commands in .htaccess files. if try so, you'll see "internal server error" message.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -