Re: Re: Workaround ISP's redirect of 404 Not Found PHP pages?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, January 26, 2006 9:32 am, James Benson wrote:
>>>  PHP is running as a CGI on the shared hosting servers, which is
>>>  why your .htaccess isn't working for it.
>>>
>>>  You will have to create the error rule within a php.ini file.
>>
>
>
> That is so much bull, how then can it work for NON .php files?
>
> I know for a fact that CGI does not prevent you using .htaccess or the
> ErrorDocument directive in apache because Im using one myself right
> now
> in CGI mode and it works just fine, does your webhost use a custom
> error
> page that advertises its own services or provides a link to their
> website by any chance?

Perhaps his host has somehow managed to force PHP CGI to kick in
*BEFORE* the ErrorDocument of Apache...

Now, I got no idea how they would manage to do that, but it seems like
a reasonable assumption...

WILD GUESS:
If they do PHP CGI with EngineRewrite, and if that takes effect before
the ErrorDocument handler, as I suspect it would, then it would
explain this behaviour, and their response, without the sinister
implications James suggests.

They may even be laboring under the impression that that's the only
way to make PHP CGI work.

More likely, they think it's the best way to make it work for them and
their customers.

I'm not aware of any kind of 404 settings avaiable in php.ini, but
perhaps they just assumed it could be done in php.ini to handle
non-existent files in some way.

>From the phpinfo URL provided by the OP, it looks like they are giving
him PHP CGI with his own php.ini file to tinker with, which could be
quite handy, compared to some shard hosting environments I've suffered
through...

What's that old saying?
Never assign to malice what can be explained by sheer stupidity.

Something like that.

I've come to realize, as I get older, that what we often perceive as
some sort of diabolical plot to foil us, is just some other poor guy
doing the best they can with what they've got, and our failure to
appreciate what it is they are offering/doing and why.

Jeez, now I feel like I gotta go watch Karate Kid or something...

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux