Strange error messages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pete_lol
Forum Newbie
Posts: 3
Joined: Sun Feb 03, 2008 7:59 am

Strange error messages

Post by pete_lol »

Hello,
I think my website hosts have done something to my login script as after they did some maintenance on my server i get a timed out error message. I just want to find out some possible reasons why that message is generated just to make sure it's not my script.

As far as i know the script was working perfectly well. There's no loops so there's no chance of an infinite loop.

After the script has timed out and i try to load another page i get error messages saying that my header and footer files couldn't be found.

Does this sound like a php or server error?

Thanks, Peter

Edit: It's complaining about this line:

Code: Select all

//check username
if(!file_exists("./{$dir_accounts}/".$_POST['username_post']."_user.php")){
   $error = true;
}
//this line
if(file_exists("./{$dir_accounts}/".$_POST['username_post']."_user.php")){
   include("./{$dir_accounts}/".$_POST['username_post']."_user.php");
   if($password != md5($_POST['password_post'])){
      $error = true;
   }
}
Last edited by John Cartwright on Sun Feb 03, 2008 3:08 pm, edited 1 time in total.
Reason: Jcart | Please use [code=php][/code] tags when posting code
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Strange error messages

Post by califdon »

What error messages are you receiving?
pete_lol
Forum Newbie
Posts: 3
Joined: Sun Feb 03, 2008 7:59 am

Re: Strange error messages

Post by pete_lol »

A time out error. Something like "the script has timed out after 30 seconds /home/../../ line 17"
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Strange error messages

Post by Christopher »

How big is the file?
(#10850)
pete_lol
Forum Newbie
Posts: 3
Joined: Sun Feb 03, 2008 7:59 am

Re: Strange error messages

Post by pete_lol »

2KB.I put in my header a message and added die() after, but now i've removed that message and die() but it seems when the cookie is there the error is applied again, along with error messages saying the header and footer can't be found.

I found the problem, and i have absolutely no idea why it generated these errors. My ftp client sometimes writes index.php to the wrong directory and in this case it wrote it to my accounts directory.
Last edited by pete_lol on Mon Feb 04, 2008 4:19 pm, edited 1 time in total.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Strange error messages

Post by califdon »

It makes it very hard to answer your questions unless you show us verbatim what error messages you are receiving.
Post Reply