Click to See Complete Forum and Search --> : [RESOLVED] Reconfiguring ForceType for PHP5 with CGI


DarkNemesis618
03-14-2008, 08:04 PM
My hosting company just switched from running PHP as an Apache module to running it as CGI. This has completely screwed up how my URLs are read as I use the ForceType directive to parse the URLs. All it gives me now is the error "No Input File Specified"

Example:
http://blog.darkernemesis.com/archives/2008/03/Tribute-to-My-Grandfather/
http://blog.darkernemesis.com/archives/{year}/{month}/{title}

(archives.php is the file)

Using the ForceType directive and the php explode function to break that down to what I need.

From what I've read, ForceType doesn't work when PHP is running as cgi.

I read that changing ForceType to SetHandler would fix the issue but have been unsuccessful with that as well.

Any suggestions?

.htaccess (before with ForceType)
<files page>
ForceType application/x-httpd-php
</files>

.htaccess (trying with SetHandler)
<files page>
SetHandler application/x-httpd-php
</files>

I don't have access to be able to change it back to a module.

DarkNemesis618
03-15-2008, 04:41 AM
I solved my own problem but in case someone else is having difficulty, I figured I'd post my solution.

I removed my .htaccess file completely and added

cgi.fix_pathinfo = 1

to my php.ini file and my pages started working again. Hope that helps someone.