I transferred website to new server(PHP Version 5.3.8) which had "Server API=CGI/FastCGI", website was working fine except one page(public_html/user/index.php). I got error:
500 Internal Server Error
Then, I changed Server API to " Apache 2.0 Handler ", now I get blank white page. phpinfo( ) is showing me register_globals Off
The .htaccess in public_html/user/ has below content
#deny from all
#AddType application/x-httpd-php .html
#AddHandler x-httpd-php .html
#AddHandler x-httpd-php .htm
#AddType image/x-icon .ico
php_value display_errors On
#php_value register_globals On
php_value error_reporting E_ALL
#E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
Old server was running PHP Version 5.2.8
Any advise?
register_globals being deprecated does not explain it giving internal server error, especially if it has been commented out.
You are getting internal server error because you are trying to set values that are not understood or allowed by the server. As with server errors in general, apache's error logs should provide you details of the error.
Based on experience, my first guess would be that the (www) user running your PHP scripts hasn't been given the rights to set php_value:s through .htaccess. To set .htaccess values, you'll need to have in the apache configuration AllowOverride Options or AllowOverride All privilege ("All" includes "Options"). My first thing would be to check that. php_value directives need AllowOverride Options privilege.
php_value and php_flag commands are obsolete, and will cause 500 errors on most servers when used in .htaccess. Their settings should be done in a php.ini file or the equivalent on your system.
I myself was having this error.
phpinfo() - in my website was showing as register_globals = off
Found solution through 2 hour r&d web searches - edited the php.ini to register_globals=off
and uploaded it again and website was running within seconds.
Hope this solutions helps somebody to run his/her website.
register_globals
has been deprecated since PHP 5.3 and is turned off by default for security reasons.
See the pHP documentation for more information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.