WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] phpsuexec and .htaccess (8 posts)

  1. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Moving to a new host

    PHP version 4.3.11
    Apache version 1.3.33 (Unix)
    phpsuexec is running somewhere

    Problem:
    .htaccess is not generated, written to or even seen.

    What I have done:
    Fresh 1.5.2 code, set .htaccess to 666 generated default permalinks. WP reports NO error, but .htaccess is not modified.
    Removed the .htaccess - exactly the same thing - no error reported.
    Set permissions on the .htaccess to 644, try to update and again get a success message.

    Repeated all that with the latest code.

    I have copied a .htaccess from the previous host and then things work - but if I add a Page, that 404's because the .htaccess is not written to.

    So without the .htaccess, it's back to un-pretty links, but why is WP not reporting errors when it should be ?

    From their support:
    "runs PHP as CGI. This is a security feature called phpsuexec. You will need to check with the script maker for any support involving running their script with phpsuexec and to see if this issue (not generating a correct .htaccess file) is common on servers running phpsuexec or what other issue or feature can be causing your issue. Mod_rewrite is active on all servers "
    They helpfully indicate that I might find some help for this problem in these forums :)

    I've done all I know and it's definitely this phpsuexec that is throwing the spanner in the works - what can I do / try next ?

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    I've tried the change to vars.php as suggested in Codex, but .htaccess is not generated.
    I know that I need to create a php.ini for any directives, but all I want are the nicer urls.

    Are these at all possible for both posts AND pages ?

    If not, then this really should be flagged up given that it's a selling point.

  3. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Sorted - I think.

    I had to use the reduced rewrite plugin by Ryan:
    http://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/

    I haven't yet got a clean way of doing this as I was using a blog I could wipe out, but I deleted everything, including the DB.
    Reinstalled
    Activated the plugin
    Set the Rewrite rules I wanted
    Put this single line into .htaccess
    RewriteRule ^(.+)$ /index.php/$1
    and now I can create what I want.

    BUT
    Urls that were like this:
    http://www.example.com/date/category/title
    become
    http://www.example.com/index.php/date/category/title
    which when I have to migrate my blog, will break every post and comment permalink (that's around 6000 broken urls).
    There must be a better way surely ?

  4. Mark (podz)
    Support Maven
    Posted 8 years ago #

    oooh... a thread all to myself :)

    This is now resolved.
    Bliksem Hosting - their 'sunday support' is useless.

    phpsuexec is NOT the problem.

    The problem - as kindly discovered by Matt - is that when WP says to the Bliksem Apache Server "Are you Apache ?", the server says "No." This is not from some digital sense of humour, but because Bliksem have made it that way (not that I see me telling them having any effect). Clever eh ?

    So.. if you are having similar problems on that host, open admin-functions.php, head down to lines 554-555 and make them like this:
    // if (! $is_apache)
    // return;

    Then you can have a proper website on an improper host :)

  5. minou30
    Member
    Posted 8 years ago #

    Solution is, your .htaccess file should include the following:

    DirectoryIndex index.php index.htm index.html

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Errr.....no.
    I posted the solution - the server was ****ed :)

  7. barunio
    Member
    Posted 8 years ago #

    Thank you ! I spent hours trying to figure out this problem before I finally found this thread -- commenting those two lines got the problem fixed for me as well.

  8. guchuj05
    Member
    Posted 8 years ago #

    I've been having the exact same problem with permalinks in 2.01. It says the structure has been updated when it hasn't. I copied and pasted the code into the .htacess file.

    I've tried everything. I commented out he two lines in the admin-functions.php, I edited the vars file according to the Codex... the structure still hasn't changed.

    Suggestions, anyone, on what the problem might be?

Topic Closed

This topic has been closed to new replies.

About this Topic