[solved] Default eeror files on IIS server

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

[solved] Default eeror files on IIS server

Post by hairyjim »

Hi All,

I know it is possible to modify the default error pages on IIS but I wsh to use php code within the pages to:

a) send me an email of the URL they were wanting
b) Read the requested URL string and suggest pages they may be looking for

Now I did a very simple error page with an echo on it to see if PHP code would work. It didn't. Obviously the page extension was .php and it just returned a blank page with no source in the "view source".

If I change the extension to htm, html etc (No php code) it displayed my custom error page.

I was wondering if there was some IIS option I needed to configure to allow for the execution of PHP in the custome error files?

Cheers
Jim
Last edited by hairyjim on Thu Mar 24, 2005 2:55 am, edited 1 time in total.
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

nothin

Post by method_man »

just leave it saved as a .html
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

PHP for Error messages is buggy plus you won't be able to send Content-Length headers (which may lead to IE superimposing their "friendly" error page on it).
hairyjim
Forum Contributor
Posts: 219
Joined: Wed Nov 13, 2002 9:04 am
Location: Warwickshire, UK

thanks

Post by hairyjim »

Well thanks for the replies chaps.

It is a shame I cannot use PHP in the error files effectivly.

I will stick to a plain 404 error file.

Thanks anyway.

Jim
Post Reply