|
 |
|
|
|
07-10-2006, 08:47 AM
|
404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
Okay, here's a strange problem that doesn't really fit anywhere.
I change a page, ftp it to my site, try to load that page and get a 404 error - it's only happening on my php pages, and it's driving me crazy. It' really going to the right place, I checked the permissions, etc.
I know it's probably something stupid I'm overlooking - so please tell me what I'm not seeing.
Last edited by KML9870; 07-10-2006 at 08:51 AM..
|
|
|
|
07-10-2006, 10:06 AM
|
Re: 404 error
|
Posts: 880
Location: Leeds UK
|
have you managed to change the file name at all (added a space/ removed a space).
404 = not found? so I can only assume its been renamed or somthing similar.
ibbo
|
|
|
|
07-10-2006, 10:33 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
I can change the name, I've checked the name, including caps in the right place, etc. I've never had this happen before except when it was spelled wrong or one letter was cap/lower that I missed, so I'm at a loss.
|
|
|
|
07-10-2006, 11:45 AM
|
Re: 404 error
|
Posts: 880
Location: Leeds UK
|
Thats certainly odd.
And I cannot think of anything else that would throw a 404.
Let us know whats caused it if your able to resolve it.
Ibbo
|
|
|
|
07-10-2006, 11:47 AM
|
Re: 404 error
|
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
|
Try renaming your files over ftp, maybe there is an "invisible" characture stuck in the filename ??
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
|
|
|
|
07-10-2006, 11:59 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
was one of the first things I tried 
|
|
|
|
07-10-2006, 10:43 PM
|
Re: 404 error
|
Posts: 3,110
Location: Toronto, Ontario
|
Hmm, odd indeed. Do you have any htaccess rewrites that is perhaps rewriting the renamed file into a file that doesn't exist?
|
|
|
|
07-11-2006, 02:09 AM
|
Re: 404 error
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
What's the name of the page and is it one of the links on the site in your signature? Might help if we could compare the link and the filename. I would think it's just a mismatch between the filename and what's in the link for the filename. I'm sure you checked, but I know sometimes you just need that second eye to look.
|
|
|
|
07-11-2006, 06:22 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
nope, no htaccess rewrite
The site is www.mdpracticelist.com/PhysicianLogin.php
test username is klehsten and password is michael
The 404 comes up when you submit.
The filename is check.php
I'm working on the site with a friend who is learning html. I'm doing the php and in the process off changing it to css instead of the table, etc he started it with.
|
|
|
|
07-11-2006, 07:17 AM
|
Re: 404 error
|
Posts: 880
Location: Leeds UK
|
Requested URL: /PhysicianLogin
Looks like when you bounce of to check.php (from the login form) it throws an header back to "/PhysicianLogin" and not "/PhysicianLogin.php".
This then will answer the 404 issue.
Ibbo
|
|
|
|
07-11-2006, 07:21 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
But why is it getting rid of the .php? It's in the code as PhysicianLogin.php:
PHP Code:
<?php include("misc.inc"); $connection = mysql_connect($host,$user,$password) or die ("couldn't connect to server"); $db = mysql_select_db($database,$connection); $query="SELECT * FROM Physicians WHERE Username='$Username' AND Password='$Password'"; $result=mysql_query($query) or die("Unable to carry out task because ".mysql_error()); $row = mysql_fetch_array($result); $id = $row['id']; if(mysql_num_rows($result)==0) { header ("Location:PhysicianLogin.php"); echo ("The database contains no record of your user or your password is incorrect."); } else { $_SESSION['loggedinuser'] = $id; header("Location:PhysHome.php?id"); } ?>
hmmm, maybe I should have put this in the php forum.
Last edited by KML9870; 07-11-2006 at 07:24 AM..
|
|
|
|
07-11-2006, 08:20 AM
|
Re: 404 error
|
Posts: 880
Location: Leeds UK
|
Does /path/to/PhysicianLogin.php or http://domain/PhysicianLogin.php in the header not resolve this?
Certainly an odd one.
Ibbo
|
|
|
|
07-11-2006, 09:17 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
tried it...same result
I'm glad it's not just me that can't figure this out!!
|
|
|
|
07-11-2006, 01:56 PM
|
Re: 404 error
|
Posts: 3,110
Location: Toronto, Ontario
|
The Location has to be a full URL, it cannot be relative. It should work... Try placing a space before the URL (so Location: http...), maybe PHP is just being tricky or something.
|
|
|
|
07-11-2006, 03:44 PM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
nope....same result
|
|
|
|
07-11-2006, 04:52 PM
|
Re: 404 error
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
Well this won't solve the real problem, but what about setting up a 301 redirect from PhysicianLogin to PhysicianLogin.php. It's certainly not the solution to the problem but could be a fix until someone can figure out what's going on.
|
|
|
|
07-11-2006, 10:32 PM
|
Re: 404 error
|
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
|
The culprit has to lie in the check.php page because when I type it directly in the address bar, I get the 404 with the url:
http://www.mdpracticelist.com/PhysicianLogin
__________________
<mgraphic /> - I don't have a solution but I admire the problem.
|
|
|
|
07-11-2006, 11:54 PM
|
Re: 404 error
|
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
|
I don't think this is what's causing your problem, but shouldn't the second header have an id=instead of just the id. So:
header("Location: http://www.mdpracticelist.com/PhysHome.php?id="$id);
|
|
|
|
07-12-2006, 06:39 AM
|
Re: 404 error
|
Posts: 5,489
Name: Kandi
Location: Western NY
|
Quote:
|
Originally Posted by vangogh
I don't think this is what's causing your problem, but shouldn't the second header have an id=instead of just the id. So:
header("Location: <A href="http://www.mdpracticelist.com/PhysHome.php?id="$id);
|
Yup, that was a typo - probably shouldn't code before my first cup of coffee
Quote:
|
Originally Posted by vangogh
Well this won't solve the real problem, but what about setting up a 301 redirect from PhysicianLogin to PhysicianLogin.php. It's certainly not the solution to the problem but could be a fix until someone can figure out what's going on.
|
Tried it - Didn't help.
Last edited by KML9870; 07-12-2006 at 06:42 AM..
|
|
|
|
07-12-2006, 07:07 AM
|
Re: 404 error
|
Posts: 880
Location: Leeds UK
|
I suggest opening your windows unplugging your machine and drop kicking it into the street followed by a volley of insults.
Then go grab it plug it back in and tell it to play nice otherwise.....
Ibbo
|
|
|
|
|
« Reply to 404 error
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|