View previous topic :: View next topic |
Author |
Message |
reets -
Joined: 08 Apr 2005 Posts: 13 Location: NB, Canada
|
Posted: Tue May 24, 2005 1:44 am Post subject: Error 500 : Internal Server Error |
|
|
Error 500
Internal Server Error
This is what I get with my current mysql and php installation. I have already been helped by aprelium (if that's his real name or not) and it works sometimes but not always. it has to do with the sql part because normal php pages work fine, once sql is in there it does this. seems basic sql stuff works great such as just logging into a site but when it comes to getting data for a user or something you get the error. i am using the PHP package from the Abyss website. any ideas?
REETS |
|
Back to top |
|
 |
k1ll3rdr4g0n -
Joined: 04 Jul 2004 Posts: 609
|
Posted: Tue May 24, 2005 3:18 am Post subject: |
|
|
Are you willing to post a link to your site so we may see this in action?
It almost sounds like the server isnt powerful enough to do PHP + MySQL and barfs all over with the error 500. I had close to the same problem, my sister was using the computer and eating CPU cycles and sometimes mine would display an error 500. _________________
 |
|
Back to top |
|
 |
PWD -
Joined: 04 Jan 2005 Posts: 34 Location: trying to conquer these fears I thought were GONE
|
Posted: Tue May 24, 2005 6:31 am Post subject: |
|
|
Seems you aren't generating errors to help debug this since it goes directly to the ERROR : 500.
(Usually does if the errors can't be displayed)
I haven't used the php/mysql package from this site, but I would first check to see if "display_errors" is set to 'ON' in your php.ini file.
1) Go to C:\ -> windows -> php.ini (open with Notepad)
2) Arrow down to the 'error reporting' section and make sure the following line reads:
Code: | display_errors = on; |
3) Then try running a MySQL query making sure to put the following at the end of your query to display any mysql errors that may be generated:
Code: | $result=mysql_query($query)
or die(mysql_error()); |
The ' or die(mysql_error());' part will help diagnose if it's a syntax problem, table structure problem or what ever reason it can't render the mySQL query.
Other than that I'm guessing since Aprelium already assisted you.
PWD
P.S. IF display errors was set to OFF and you changed it to 'display_errors = on;' ALWAYS A GOOD SECURITY PRACTICE on your 'Live' site to switch this back to 'OFF'. _________________ if (my($_GRATITUDE = 0)) {
kick_me(in the head);
} |
|
Back to top |
|
 |
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue May 24, 2005 12:49 pm Post subject: Re: Error 500 : Internal Server Error |
|
|
reets wrote: | Error 500
Internal Server Error
|
In PHP 5, the errors are logged to cgi.log . So have a look on this file for a relatively detailed error message from PHP.
The other suggestions posted above are also worth trying as they can give an even better error tracking method for MySQL queries. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
reets -
Joined: 08 Apr 2005 Posts: 13 Location: NB, Canada
|
Posted: Wed May 25, 2005 4:09 pm Post subject: |
|
|
ok, so I am running the correct versions of the php and mysql. it could be the cpu thing someone was talking about because the problem only occurs sometimes, not ALL the time. only thing is, the computer isn't being used when I am at work and there isn't really anything big running on it to take up my cpu.
I do use die on every php sql query so that should be good to go. i'll double check my php.ini file for that setting.
system is:
Athlon 3000+
1gb RAM
380gb HD |
|
Back to top |
|
 |
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Wed May 25, 2005 4:13 pm Post subject: |
|
|
reets wrote: | ok, so I am running the correct versions of the php and mysql. it could be the cpu thing someone was talking about because the problem only occurs sometimes, not ALL the time. only thing is, the computer isn't being used when I am at work and there isn't really anything big running on it to take up my cpu.
I do use die on every php sql query so that should be good to go. i'll double check my php.ini file for that setting.
system is:
Athlon 3000+
1gb RAM
380gb HD |
With those specs, I very much doubt that its a CPU issue, your allright there. _________________
 |
|
Back to top |
 |
 |
reets -
Joined: 08 Apr 2005 Posts: 13 Location: NB, Canada
|
Posted: Thu May 26, 2005 8:40 pm Post subject: |
|
|
well, display_errors was turned off, so I turned that on and hopefully the next time it happens I get more information on the problem.
k1ll3rdr4g0n: you could check out the site but you would need a login and the problem only happens sometimes, not all the time :P |
|
Back to top |
|
 |
|