Error 500 : Internal Server Error

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
reets
-


Joined: 08 Apr 2005
Posts: 13
Location: NB, Canada

PostPosted: Tue May 24, 2005 1:44 am    Post subject: Error 500 : Internal Server Error Reply with quote

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 View user's profile Send private message
k1ll3rdr4g0n
-


Joined: 04 Jul 2004
Posts: 609

PostPosted: Tue May 24, 2005 3:18 am    Post subject: Reply with quote

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 View user's profile Send private message AIM Address
PWD
-


Joined: 04 Jan 2005
Posts: 34
Location: trying to conquer these fears I thought were GONE

PostPosted: Tue May 24, 2005 6:31 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Tue May 24, 2005 9:33 am    Post subject: Reply with quote

Make sure you are using the correct PHP and MySQL Version as well.

PHP V4
MySQL 4.0.24

This is the best combination to work with. I have used this for about 3 months now with no problems.

MySQL 4.0.24 download link:

http://dev.mysql.com/get/Downloads/MySQL-4.0/mysql-4.0.24-win.zip/from/http://www.mirrorservice.org/sites/ftp.mysql.com/

Hope this helps.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue May 24, 2005 12:49 pm    Post subject: Re: Error 500 : Internal Server Error Reply with quote

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 View user's profile Send private message Send e-mail
reets
-


Joined: 08 Apr 2005
Posts: 13
Location: NB, Canada

PostPosted: Wed May 25, 2005 4:09 pm    Post subject: Reply with quote

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 View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Wed May 25, 2005 4:13 pm    Post subject: Reply with quote

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 View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
reets
-


Joined: 08 Apr 2005
Posts: 13
Location: NB, Canada

PostPosted: Thu May 26, 2005 8:40 pm    Post subject: Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group