WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks, IIS 6, PHP 5.2.1 (upgrade from 5.2.0) (10 posts)

  1. janr
    Member
    Posted 7 years ago #

    [I hope "How-To and Trobleshooting is the correct forum for this...]

    Hello,

    Last week we, the hosting company I work for, upgraded from PHP version 5.2.0 to 5.2.1. And suddenly customers started complaining about permalinks stopped working and returning 404 errors. I am now trying to find the cause (probably changes in some of PHPs regular expression-like functions), but my guess is the WordPress developers here know more about the rewriting code of WordPress than I do to pinpoint it :)

    For my test purposes I have created two identical application folders with one difference: One of them uses PHP 5.2.0 and the other 5.2.1. They both use the same php.ini file. The phpinfo() information is located here:
    http://www.vevida.to/php/php520/phpinfo.php
    http://www.vevida.to/php/php521/phpinfo.php

    and both WordPress installations can are located here:
    http://www.vevida.to/php/php520/index.php
    http://www.vevida.to/php/php521/index.php

    As you can see, a permalink like
    http://www.vevida.to/php/php520/index.php/2007/02/21/lorem-ipsum/
    works, and
    http://www.vevida.to/php/php521/index.php/2007/02/21/lorem-ipsum/
    does not.

    We noticed the same behaviour with blogs/cms's like ExpressionEngine, which we could "fix" with ISAPI_Rewrite. But I have not tested that thoroughly...
    Is this a problem I (or better, the WordPress developers ;)) can fix by changing some code or functions? Or is this a problem with (some of) the PHP core fuctions which needs to be fixed by the PHP developers?

    If anyone is capable of rewriting the .htaccess rewrite rules to ISAPI_Rewrite (http://www.isapirewrite.com), I would be more than happy to test them :-) ISAPI_Rewrite support within WordPress (next to .htaccess) would be a nice addition, for websites hosted on Windows/IIS.

    Thank you in advance for any insights, pointers and/or help.

    Best regards,
    Jan Reilink, VEVIDA Services bv

  2. supercharged
    Member
    Posted 7 years ago #

    I found this thread on Google, and happen to be one of the affected customers. Some more Googling brought this up. Does that help?

  3. supercharged
    Member
    Posted 6 years ago #

    Downgrading to php 5.2.0 solved it.

  4. Craig3
    Member
    Posted 6 years ago #

    Take a look at IIS Mod-Rewrite. It's mod_rewrite compatible and it even supports .htaccess. Unfortunatelly it is commercial, so ask your provider if they can support it.

  5. Craig3
    Member
    Posted 6 years ago #

  6. mundi89
    Member
    Posted 6 years ago #

    If you can deal with the /index.php here is a solution that might help?
    http://urld.ca/article.php?id=1

  7. janr
    Member
    Posted 6 years ago #

    I believe to have permalinks properly function now. In cooperation with Helicon's ISAPI_Rewrite. I have made one code change to wp-includes\classes.php:

    // $req_uri = $_SERVER['REQUEST_URI'];
    $req_uri = $_SERVER['HTTP_X_REWRITE_URL'];
    (line 46) and with the follwing rewrite rules (which I found on the Helicon forum):
    # For file-based wordpress content (i.e. theme, admin, etc.)
    RewriteRule /php/wordpress/wp-(.*) /php/wordpress/wp-$1 [L]
    
    # For normal wordpress content, via index.php
    RewriteRule ^/php/wordpress/$ /php/wordpress/index.php [L]
    RewriteRule /php/wordpress/(.*) /php/wordpress/\?$1 [L]

    Example (only temporarily online):
    http://www.vevida.to/php/wordpress/

  8. James Revillini
    Member
    Posted 6 years ago #

    Awesome - this method is still workin' in WP 2.3.1!

  9. mobilelibrary
    Member
    Posted 6 years ago #

    Hi Jan, thanx! I am one happy customer...

  10. zhrance
    Member
    Posted 6 years ago #

    Cheers Jan for your post,

    This problem gave me headaches and by using your .ini code it works!

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags