简体   繁体   中英

Error 500 in FastCGI on PHP

I recently changed server. This my new server using FastCGI to interpret PHP. However, much that I brought from the old server is giving this error again, and the problem is that FastCGI does not return the error to debug, it just returns a "500 internal server error".

With that I'm not exactly sure what line to correct the error occurred. I have scripts immense, which makes unfeasible review the entire a Code.

Already tried using

try {.. }

in known errors, but still FastCGI returns the 500 error.

I'm not a server administrator to power on mecher environment variables, is there any way to work around these errors from within PHP?

This error may be cause because you didn't set the proper permissions for the directory.

You should set the proper permissions and then try run the script. It should work.

Try running simple php file to see if it shows this error. If so then change permissions. If not then check the logs because the problem may be in your script.

You can also set display_errors to 1 in php.ini, htaccess or inside script

in php.ini look for error_reporting and display_errors

error_reporting  =  E_ALL
display_errors = 1

Put this inside your code, it'll turn error reporting on.

ini_set('display_errors',1);
error_reporting(E_ALL);

I had the same error, I had the proper permissions.

What fixed my problem was to download Visual C++ Redistributable for Visual Studio 2012 Update 4 x86 .

I have PHP in x86 so I downloaded VSU_4\\vcredist_x86.exe .

I had just x64 before solving my issue. Installing VSU_4\\vcredist_x86.exe solved the problem and now I have both.

I hope it helps!

Yo can download VSU_4\\vcredist_x86.exe here: http://www.microsoft.com/en-us/download/details.aspx?id=30679

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM