1
I am working on a PHP web application.
The problem I am facing is that the application is working 100% locally, but when I play on the server some things present the error 500. But the error 500 is very abstract, I end up getting lost, I look at the code and it’s all right.
Is there any way I can more specifically display which error is occurring?
Console:
NOTE: I could debug with var_dump and console.log or something, the problem is that when I go up the site it takes at least 15min to complete the deploy.
NOTE²: I use AWS server (Amazon Web Services)
One of the first habits that anyone who deals with PHP should create, in my view, is to always keep an eye on the error log.
– Bacco
You can go to the network tab and check if you have more details about the error by selecting the request that resulted in failure
– JrD
@Jrd considering that the network tab works on the client side and the 500 error occurs on the server side, I find it unlikely that you will find many details in the specific case. (but I see no harm in looking there, obviously)
– Bacco
@Jrd error 500 indicates a Generic error occurred in the application in back-end, there on the console already appears the error page, however Otavio, the problem may be the version of your PHP that is different from the server and your PHP may be written in a way that is not compatible with your hosting. Another possibility is that you forgot to set up something, like a bank. But only with this information it is impossible to help you at the moment.
– Guilherme Nascimento
@Bacco I’ll check this log there, thanks!
– Otavio Souza Rocha
@Jrd actually I’ve already looked at the network, it has no information about the error.
– Otavio Souza Rocha
@Guilhermenascimento The version I believe is correct, because the application is already ready and in the air for a while, I just change and go up, I was not the one who developed. Anyway, I’ll take a look, thanks!
– Otavio Souza Rocha
@Otaviosouzarocha maybe something you added, maybe something that changed the syntax, maybe some include, maybe the way you uploaded via FTP (yes, this can truncate the files), could be countless things.
– Guilherme Nascimento
@Guilhermenascimento yes, error 500 is too wide, exactly this my problem, I need to see more specifically what is occurring, I will try to find the log to see if I can see
– Otavio Souza Rocha