This has never happened before. Usually it displays the error, but now it just gives me a 500 internal server error. Of course before, when it displayed the error, it was different servers. Now I'm on a new server (I have full root, so if I need to configure it somewhere in the php.ini, I can.) Or perhaps its something with Apache? Show I've been putting up with it by just transferring the file to my other server and running it there to find the error, but that's become too tedious. Is there a way to fix this? asked Apr 22, 2010 at 1:45
1
Check the
After that, restart server.
Davide 1,5751 gold badge14 silver badges29 bronze badges answered Apr 22, 2010 at 1:49
awgyawgy 16.2k4 gold badges24 silver badges18 bronze badges 7 Use
Matthew Lock 12.4k11 gold badges89 silver badges128 bronze badges answered May 25, 2016 at 3:53
AaronAaron 5535 silver badges12 bronze badges 3 It's worth noting that if your error is due to .htaccess, for example a missing rewrite_module, you'll still see the 500 internal server error. answered Aug 4, 2014 at 1:53
dtbarnedtbarne 8,0335 gold badges42 silver badges48 bronze badges 1 Be careful to check if
or
is active (not a comment) somewhere else in the ini file. My development server refused to display errors after upgrade to Kubuntu 16.04 - I had checked php.ini numerous times ... turned out that there was a diplay_errors = off; about 100 lines below my
So remember the last one counts! answered Sep 9, 2016 at 15:17
MaxMax 2,39921 silver badges26 bronze badges Try not to go
but
and change it there, it worked for me... answered Mar 20, 2017 at 20:57
Enabling error displaying from PHP code doesn't work out for me. In my case, using NGINX and PHP-FMP, I track the log file using grep. For instance, I know the file name mycode.php causes the error 500, but don't know which line. From the console, I use this:
And I have the output:
This helps me find the line where I have the typo. answered Apr 4, 2016 at 5:05
Hao NguyenHao Nguyen 5184 silver badges9 bronze badges If all else fails try moving (i.e. in bash) all files and directories "away" and adding them back one by one. I just found out that way that my .htaccess file was referencing a non-existant .htpasswd file. (#silly) answered Mar 6, 2017 at 12:16
How do I get rid of 500 internal server error?How to Fix the 500 Internal Server Error. Reload the web page. ... . Clear your browser's cache. ... . Delete your browser's cookies. ... . Troubleshoot as a 504 Gateway Timeout error instead. ... . Contacting the website is another option. ... . Come back later.. Why do I keep getting 500 internal server error?The 500 Internal Server error could be caused by an error during the execution of any policy within Edge or by an error on the target/backend server. The HTTP status code 500 is a generic error response. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.
What causes 500 errors PHP?PHP Coding Timing Out
If your PHP script makes external network connections, the connections may time out. If too many connections are attempted and time out, this will cause a "500 Internal Server Error." To prevent these time outs and errors, you'll want to make sure that PHP scripts be coded with some timeout rules.
How can I get Internal server error in PHP?Below are common troubleshooting steps that can be taken to resolve a 500 Internal Server Error:. Check the error logs.. Check the . htaccess file.. Check your PHP resources.. Check CGI/Perl scripts.. |