• Hi, I run w site with wp 2.0.3 in root directory, apache loads mod_rewriter.

    The problem is only when pretty permalinks are enabled.
    When I try to run a script from cgi-bin folder I get 404 error :/ what is strange because when I turn off permalinks everything works fine…

    please help, I’m looking for the cure for 2 weeks now on this board (cuz first I had 1.5.2 and thought if I update to wp 2.0.3 the problem will gone out, but didnt’t)

    I feel that the whole issue is with .htaccess cuz when I keep it clean(without “permalinks lines”) everything is fine but after turning permalinks on I get 404 error…

Viewing 12 replies - 1 through 12 (of 12 total)
  • How are you running your cgi script? In a post? On a page? Something completely different?

    Thread Starter gaster

    (@gaster)

    on a page… I type in web browser adress to script…

    I am having this same problem, only it doesn’t matter if pretty permalinks are on. It even happens when I completely remove the .htaccess file from the server. How else can WordPress be blocking access to the cgi-bin? I don’t get it.

    It’s probably the wysiwyg editor – disable it and try it again:
    admin -> users -> scroll to bottom left

    Also uncheck the box for:
    “WordPress should correct invalidly nested XHTML automatically”
    admin -> options -> writing

    Thread Starter gaster

    (@gaster)

    I disabled both these options and no progress ?? still getting 404 error ??

    Thread Starter gaster

    (@gaster)

    I still think it’s a problem of .htaccess cuz when I turn off pretty permalinks I’m able to access cgi-bin …

    Thread Starter gaster

    (@gaster)

    please help

    Try putting this into your .htaccess file:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/cgi-bin(/.*)?$ [OR]
    RewriteCond %{SCRIPT_FILENAME} -f [OR]
    RewriteCond %{SCRIPT_FILENAME} -d
    RewriteRule .* - [PT,L]

    RewriteRule ^([a-zA-Z0-9-]+)/?$ /index.php [L]
    RewriteRule ^([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ /index.php [L]
    </IfModule>

    # END WordPress

    This code actually didn’t help me – I’m still getting 404 file not found even when I don’t use pretty permalinks – and the permissions are fine. I can’t even access cgi-bin if I completely delete the .htaccess file. so I don’t know what’s going on.

    Thread Starter gaster

    (@gaster)

    AWESOME!! Dude! dvdbdgr! Thnx, for me it works, don’t know why… but for now it works fine!! ??

    for other people remember that I’ve got upgraded wp first to 2.0.3 version

    Beware. If you update WordPress, it may erase this hack and replace it by it’s own code. I strongly advise to make a copy of your .htaccess file to redo this trick.

    Thread Starter gaster

    (@gaster)

    I will copy .htaccess and bookmark this thread ?? It will help in future

    bryan868

    (@bryan868)

    I’m having this same problem. My wordpress is in the root directory, I’m using permalinks, and my cgi-bin scripts do not work (403 Forbidden error). When I get rid of the .htaccess file, the cgi-bin scripts work again.

    I tried dvdbdgr’s fix, and it didn’t work. I’m sure there’s some fix for the .htaccess file, can anyone help? Why would the rewrite engine be disabling my cgi-bin?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘wp 2.0.3 can’t run cgi from cgi-bin’ is closed to new replies.