php flag error
-
Since the most recent update to NGFB my server catches an error from the new htaccess in the cache folder
Invalid command ‘php_flag’, perhaps misspelled or defined by a module not included in the server configuration
-
Hm. I haven’t changed the
.htaccessin 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 .shtmlMaybe I can add a test for php – let me get back to you later today…
Thanks,
js.
If you get a chance, could you modify the
.htaccessin 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 .shtmlThannks,
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.
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
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
The
wp-content/plugins/nextgen-facebook/cache/.htaccessfile 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.
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
As it should. I think you have a bigger, more fundamental problem on that first site.
.htaccessfiles in a folder should not be affecting anything else than what’s in that folder (and bellow)…You may have to remove that
.htaccessfile from the first site.If I think of any other alternatives, I’ll let you know. 😉
Thanks,
js.
The topic ‘php flag error’ is closed to new replies.