404 instead of MySQL error

Status
Not open for further replies.

jordan85

New Member
Messages
6
Reaction score
0
Points
1
I'm working on a script and noticed that every time there is a MySQL error, I'm redirected to a 404 page.
This isn't very productive if I need the error message to fix the problem. How do I retrieve MySQL error logs?
Is this a mod_security problem?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
It mod_security, but it's not a "problem", it's the intention of the module. It's never a good idea to do your development in a production environment, and Free Hosting is production (perhaps that's not what you want for your particular account, but it's the case for most users and the intent of the service).
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
It mod_security, but it's not a "problem", it's the intention of the module. It's never a good idea to do your development in a production environment, and Free Hosting is production (perhaps that's not what you want for your particular account, but it's the case for most users and the intent of the service).
with the new x10hosting's security mod_security hammer and no log files
after years of having a account with x10hosting - I for one now need to test my PHP/MySQL scripts on some other host to find where the error is at and what it is
for me that is a "problem"
 

jordan85

New Member
Messages
6
Reaction score
0
Points
1
It mod_security, but it's not a "problem", it's the intention of the module. It's never a good idea to do your development in a production environment, and Free Hosting is production (perhaps that's not what you want for your particular account, but it's the case for most users and the intent of the service).
I do believe transitioning from development to production is also a phase of development. This is unacceptable. We would like error logs for each user please.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
As far as I know, in php.ini, it should have a directive set to create the error_log file when errors come along, especially MySQL if the error came from a function.

I'm not sure if mod_security is preventing the logging...
 

ace_case

Member
Messages
217
Reaction score
11
Points
18
Kind of off topic here, but mod_security shouldn't be throwing a 404 IMO. A 404 is for not found. Perhaps a 500? Throw anyone a 404, and they wonder where the file went. Give them a 500 and they know something isn't right.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Kind of off topic here, but mod_security shouldn't be throwing a 404 IMO. A 404 is for not found. Perhaps a 500? Throw anyone a 404, and they wonder where the file went. Give them a 500 and they know something isn't right.
I believe the fake 404 HTTP response is to try to hide the fact that there's an issue with the script (PHP to be exact). Yes, this is very misleading for the webmaster and can cause a whole bunch of confusions.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
The fact that the 500 leaks information is precisely why the 404 is hiding the error. It's the whole freaking point of the mod_security system.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You can turn on error logging from cPanel via the PHP settings (under PHP version). It's not on by default because it eats up exabytes of space quickly due to outdated and handcrufted code.
 
Status
Not open for further replies.
Top