Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author JS Morisset

    (@jsmoriss)

    Hm. I haven’t changed the .htaccess in the cache folder for quite a while… The contents are:

    # prevent execution of php files from the cache folder
    php_flag engine off
    AddType text/plain .php .pl .cgi .sh .shtml

    Maybe I can add a test for php – let me get back to you later today…

    Thanks,

    js.

    Plugin Author JS Morisset

    (@jsmoriss)

    If you get a chance, could you modify the .htaccess in the cache folder and give this a try?

    # prevent execution of php files from the cache folder
    <IfModule php5_module>
            php_flag engine off
    </IfModule>
    <IfModule suphp_module>
            suPHP_Engine off
    </IfModule>
    AddType text/plain .php .pl .cgi .sh .shtml

    Thannks,

    js.

    I get the following error with that change:

    /public_html/wp-content/plugins/nextgen-facebook/cache/.htaccess: suPHP_Engine not allowed here

    Removing the suPHP IFModule statement works in my case.

    Plugin Author JS Morisset

    (@jsmoriss)

    Yeah, but if you browse wp-content/plugins/nextgen-facebook/cache/index.php, you’ll see that the php gets interpreted. I’m trying to prevent that. Perhaps this would be a better approach, compatible with both mod_php and mod_suphp…

    <FilesMatch "\.(php|pl|cgi|shtml)$">
            Order   deny,allow
            Deny    from all
            #Allow  from all
    </FilesMatch>

    js.

    That one works with no errors

    Plugin Author JS Morisset

    (@jsmoriss)

    Excellent! 🙂

    I’ll update future packages with this change.

    Thanks,

    js.

    no, that doesn’t work. It created 404 errors, killed my homepage widgets and made home say Private:Home

    Plugin Author JS Morisset

    (@jsmoriss)

    The wp-content/plugins/nextgen-facebook/cache/.htaccess file applies only to the cache/ directory, so there’s no reason for it to affect anything else. Your website should answer with a “403 Forbidden” page. What that page looks like is up to your website’s config. For example, here’s mine:

    http://surniaulula.com/wp-content/plugins/nextgen-facebook/cache/index.php

    Not super pretty, I admit. I’ll have to look into making it a little more friendly. 😉

    js.

    Going to the index.php page directly went to a 404 error page, and I agree, I see no reason for it to affect other pages, but returning to the previous fix without the SuPHP line fixed the widgets and Private issue.

    Plugin Author JS Morisset

    (@jsmoriss)

    There’s no suphp line in the last .htaccess I suggested:

    <FilesMatch "\.(php|pl|cgi|shtml)$">
            Order   deny,allow
            Deny    from all
            #Allow  from all
    </FilesMatch>

    Are we talking about the same thing here? This is the content of the .htaccess in your wp-content/plugins/nextgen-facebook/cache/ folder, right?

    Thanks,

    js.

    Yes, I’m referring to the htaccess in wp-content/plugins/nextgen-facebook/cache/ folder.

    I tested this on another site to see if I have the same errors I got on the first site. This is what I’ve changed the htaccess to on both sites.

    <FilesMatch "\.(php|pl|cgi|shtml)$">
            Order   deny,allow
            Deny    from all
            #Allow  from all
    </FilesMatch>

    On the second site, everything seems fine

    Plugin Author JS Morisset

    (@jsmoriss)

    As it should. I think you have a bigger, more fundamental problem on that first site. .htaccess files in a folder should not be affecting anything else than what’s in that folder (and bellow)…

    You may have to remove that .htaccess file from the first site.

    If I think of any other alternatives, I’ll let you know. 😉

    Thanks,

    js.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘php flag error’ is closed to new replies.