To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > Windows Help

Windows Help Help with the Windows operating system

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2000, 11:52 AM   #1
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
PHP won't redirect to error page

Our site's setup:
We're hosted on an NT server running IIS.
Our site is set to parse .shtml files as PHP since it made for an easier upgrade. Everything works fine except the problem below.

We asked our host's support folks to redirect 404 errors to an error page to make the experience a little easier for visitors.

Here's an interesting quirk. When you type in a nonexistent location like:

http://www.digitalhit.com/bubba.html (notice that's html not shtml) or
http://www.digitalhit.com/bubba

the site redirects to the new error page just fine.

If the file that doesn't exist is an .shtml file or .php3 file it tosses out a "PHP error: Fatal error: Unable to open F:\users\site\www\htdocs\bubba.shtml in - on
line 0 No input file specified." instead of the error page.

Any idea why PHP would jump over IIS's error redirect? Any solutions?
Anon is offline   Reply With Quote
Old 08-06-2000, 03:10 PM   #2
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP won't redirect to error page

This is an interesting situation. What is happening is that when u do not enter a page that is not to be handled by PHP like .html or .gif , the web server IIS, redirects according to its default redirect settings. But when you request a .shtml page which is processed by PHP, IIS is passing this parameter to PHP as it was configured. Hence PHP is returning a No input file specified error. Apache on the other hand first checks for a missing file and then redirects. I strongly believe that this is a problem with IIS and i am no IIS expert, so tell this to your host and let them correct it. Or else, if you would take my suggestion, log-on to #php on EFNet. But whatever the case, I should mention that support for Windows is slim as most users r Unix-based. Cheers!
Anon is offline   Reply With Quote
Old 11-29-2000, 11:40 AM   #3
Anon
Senior Member
 
Join Date: Jun 2000
Posts: 65,386
RE: PHP won't redirect to error page

IIS is passing a non exsistent page to PHP. PHP cannot generate headers and causes an internal server error. You need to stop IIS from passing non existent files. There is a tick box under the Application Configuration section

In the MMC for Internet Information Server, choose properties for the Web site in question, select Configuration in the Application Section of the Home Directory Tab. Edit the mapping for .php files, a window will pop up with a check box entitled 'Check that file exists' in the lower left hand corner.

Anon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 12:00 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.