homepage Welcome to WebmasterWorld Guest from 54.211.235.255
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
PHP page works in FF but not IE
Not to sure how to find out why.
rj87uk




msg:3121006
 2:24 pm on Oct 14, 2006 (gmt 0)

Ok,

I have a set of pages generated from a database.

They all work fine and the way they are ment to in FireFox (and several other broswers like opera). However they do not work in IE. I get a 404 Not found error.

Instead of getting this one question answered it might be better for the forum if we explore ways to find and fix errors like this in PHP.

So with an error like this what is the best way to find out what it is so that I can fix it?

RJ

 

numnutz




msg:3121162
 5:12 pm on Oct 14, 2006 (gmt 0)

If IE is not finding the file it sounds as though you have a case error in your filenames somwhere - It's best to use all lower case letters for filenames as Linux knows the difference between uppercase and lowercase but IE / Windows doesn't.

Hope this helps

nn :)

rj87uk




msg:3121534
 1:10 am on Oct 15, 2006 (gmt 0)

Hi, numnutz!

Thanks for you reply - your name sounds oh so Glaswegian!

Anyway, I changed one of my page names to all lower case but there was no change still the same error.

Is there something in the code that I could add in that would bring me back an error so that I would know how to fix it?

I mean, I have no idea about these things!

rj87uk




msg:3121828
 12:33 pm on Oct 15, 2006 (gmt 0)

Added:

It's best to use all lower case letters for filenames

I changed all the file names to lowercase however there was no change in the error.

eelixduppy




msg:3121874
 1:32 pm on Oct 15, 2006 (gmt 0)

This problem doesn't seem to be from PHP. It's parsed server-side, so the browser should have no affect. Maybe you are redirecting to another page that doesn't exist? Also, do you have any mod_rewrites doing anything here? Look at everything affecting this file; something is fishy about this :)

mcavic




msg:3121901
 2:17 pm on Oct 15, 2006 (gmt 0)

I asked RJ to send me the url so that I could see for myself. The server is returning a 404 error along with the correct content. IE handles this by giving its own error page, while other browers ignore the error and just display the content. Search engines, like IE, will see the error and not the content.

Now, that is indeed fishy. Does your code use header() for any reason? For example, on inventory database pages, I use header("HTTP/1.1 404 Not Found") to generate an error when an item is no longer available, so that search engines will drop the page.

rj87uk




msg:3121927
 3:07 pm on Oct 15, 2006 (gmt 0)

Does your code use header() for any reason?

Just an update to this saga, yes I do however I took them all out and still got the same error. So im stuck!

<added>

I switched off "show friendly http errors" and the page worked in IE, So what does this tell us?

mcavic




msg:3121940
 3:32 pm on Oct 15, 2006 (gmt 0)

I switched off "show friendly http errors"

That just means that you've told IE to ignore the error, like FF does.

rj87uk




msg:3121966
 4:13 pm on Oct 15, 2006 (gmt 0)

That just means that you've told IE to ignore the error, like FF does.

Thanks. It must be a code error then!

Can I put a line of php in to help find out what exactly the error is?

mcavic




msg:3122166
 8:11 pm on Oct 15, 2006 (gmt 0)

Try putting:
ob_end_flush();

At the very top of the php page. If that fixes it, then the problem must be a header(). Maybe you missed one?

suzie250




msg:3122972
 4:39 pm on Oct 16, 2006 (gmt 0)

Can I put a line of php in to help find out what exactly the error is?[

To check for php errors, place

<?php error_reporting(E_ALL);?>

at the top of your file. Just don't forget to remove it after the errors are fixed.

Suzie

mcavic




msg:3123053
 6:03 pm on Oct 16, 2006 (gmt 0)

<?php error_reporting(E_ALL);?>

Yes, but this most likely isn't an error as far as PHP is concerned.

rj87uk




msg:3123160
 7:35 pm on Oct 16, 2006 (gmt 0)

Yes, but this most likely isn't an error as far as PHP is concerned.

I agree, I should get this problem fixed tomorrow - I will let everyone know what was wrong!

eelixduppy




msg:3126298
 10:36 pm on Oct 18, 2006 (gmt 0)


I agree, I should get this problem fixed tomorrow - I will let everyone know what was wrong!

How's the progress coming? ;)

rj87uk




msg:3139610
 11:52 am on Oct 30, 2006 (gmt 0)

update: I have not been able to fix it however I posted in the Commercial Exchange I hope to pay someone to fix this bug.

Will let you know all how they get on who ever it is!
[webmasterworld.com...]

RJ

rj87uk




msg:3142093
 11:51 am on Nov 1, 2006 (gmt 0)

Got the problem fixed there was something wrong in the .htaccess file and that must have been causing the error?

It works now, Im well happy :)

Cheers to all who tried to lend a hand!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved