[wp-hackers] PATH_INFO problem on Dreamhost with PHP as CGI
    Basil Crow 
    lists at basilcrow.com
       
    Tue Dec  7 03:03:55 UTC 2004
    
    
  
When I installed the latest CVS of WordPress 1.3 on my DreamHost account 
with PHP enabled as a CGI, it gets stuck on the code that says:
// Process PATH_INFO and 404.
if ((isset($_GET['error']) && $_GET['error'] == '404') ||
        ((! empty($_SERVER['PATH_INFO'])) &&
        ('/' != $_SERVER['PATH_INFO']) &&
        (false === strpos($_SERVER['PATH_INFO'], $_SERVER['SCRIPT_NAME']))
        )) {
Basically, my PATH_INFO is set to "/index.php" even though I'm using 
mod_rewrite, and not PATH_INFO to power my WordPress installation. 
Basically, WordPress thinks I'm trying to use PATH_INFO and gives me a 
404 for anything then. My temporary solution has been to change the 
fourth line of the above to read:
        ('/index.php' != $_SERVER['PATH_INFO']) &&
which works for my install... since PATH_INFO is set to "/index.php" 
instead of just "/" ... this problem only happens when I'm using PHP as 
a CGI on DreamHost, as an Apache module it's fine. Now i'm not sure that 
this fix is optimal, but I'm just putting out the issue to see if any of 
the devs have an idea on how to fix this before 1.3 is out?
--Basil
    
    
More information about the hackers
mailing list