DreamHost Web Hosting
Discussion Forum


Forums
   >> General Troubleshooting
*Threaded Mode

Subject PHP-CGI  
Posted byconspicuous (DH Enthusiast)
Posted on02/18/04 03:32 PM



Please bear with my ignorance, but I want to make sure that I've read the KBase correctly.

I'm getting ready to set up some new domains on my plan and last month's newsletter described how PHP running as CGI is now the default setting.

Is it correct that if I'm running PHP on a site that I CANNOT use customized 404 Error pages if I accept this default setting? https://panel.dreamhost.com/kbase/?area=2933

Anything else I should know? (There's a lot I know I need to know, but we can limit this request to germane topics)



Subject Re: PHP-CGI new [re: conspicuous]  
Posted byJosh (DH Regular)
Posted on02/19/04 12:52 PM



Only for .php (and .php3, .phtml, .pcgi) files..

that is, if somebody goes to http://www.domain.com/epohbeergerrw.php it won't use your missing.html file, it'll give a generic 404 error which you can't customize. Everything else will use your custom one!

josh!


Subject Re: PHP-CGI new [re: Josh]  
Posted byCrys (DH Regular)
Posted on02/19/04 09:02 PM



Why?? And related why wasn't I told this when support told me I had to change to php-cgi for somthing I was getting an error on to work :|:|:|:| (which I'm pretty sure now the simple addition of realpath() to my code would have fixed anyway)

edit -- and did indeed fix, eliminating those veryveryvery bad unchangable error messages, not only do they loose any and all branding, they don't have so much as a link back to '/' Or any indication what the problem is -- in fact as a user I'd assume the problem was with the site not the url I'd typed in. ('input file not found' has a very different connotation than 'file not found')


Subject Re: PHP-CGI new [re: Josh]  
Posted byxunu (DH New User )
Posted on02/19/04 11:25 PM



What about a "missing.php" file? Would it find and use that one?



Subject Re: PHP-CGI new [re: xunu]  
Posted byJosh (DH Regular)
Posted on02/20/04 05:49 AM



nope, it doesn't fine missing.php either. This was one reason why we took so long to really recommend php-cgi (and make it the default), because we were hoping they'd fix the 404 handling with it. But they never did, so we eventually decided to go ahead with it because of the other benefits.

The "reason" it doesn't do the 404 stuff correctly is because php-cgi is a "wrapper" program that takes whatever php file is called and then executes it. If it doesn't get a php file as input (really just a 404) it returns that error, instead of sending a nice 404 error back to apache to handle. Pretty dumb, we know! We wish it worked better. :/

josh!


Subject Re: PHP-CGI new [re: Josh]  
Posted byconspicuous (DH Enthusiast)
Posted on02/20/04 10:20 AM



That's really too bad.

I think I'm going to have to risk it and unclick the default setting.




*Threaded Mode
Jump to