[PHP] Solve the 500 error problem-nginx and fpm have no error logs

When deploying the code, a 500 error occurred 

However, neither the error log of www-error.log defined under php-fpm nor the error log defined by nginx shows anything

You can use the following method

 strace $(pidof’php-fpm’|sed’s/\([0-9]*\)/-p \1/g’) -e write -e read -s 1024

 

Use strace to monitor the read and write function calls of the fpm process

You can see errors like this

 

Wrong password or no permission when connecting to mysql

Just do the corresponding processing

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *