| User | Post |
|
1:19 pm December 15, 2008
| mkastner
Member
| | | |
|
| posts 9 |
|
|
It took me a while to get everythign in order, but over the last few weeks I have used your plugin to finally get my blog whgere I wanted it. Everything was even working fine after my upgrade to Wordpress 2.7, which I can't say for all the plugins I am using. But when I upgraded to RC4 of Role Scoper I started tohave an issue: I can't view any images.
The restrictions on everyhting are working just fine. Pages that should be visible are, are those that should be restricted are restricted. It's just the images. When I go to the permalink for the images I get this error:
Fatal error: Call to undefined function apache_request_headers() in ***/wp-content/plugins/role-scoper/lib/agapetry_lib.php on line 275
When I deactivate the plugin the work again. I am running on an APache server and have had no troubles of this sort until this morning. Any ideas?
|
|
|
1:59 pm December 15, 2008
| mkastner
Member
| | | |
|
| posts 9 |
|
|
I'm also getting this sometimes as well:
Fatal error: Call to undefined function got_mod_rewrite() in /home/content/m/a/t/mattkastner/html/blog/wp-content/plugins/role-scoper/attachment-interceptor_rs.php on line 25
|
|
|
2:27 pm December 15, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
mkastner said:
I can't view any images.
When I go to the permalink for the images I get this error:
Fatal error: Call to undefined function apache_request_headers() in ***/wp-content/plugins/role-scoper/lib/agapetry_lib.php on line 275
I think this would only occur on web servers with PHP < 4.3.
The following Role Scoper hack (to be included in next release) should fix it. In wp-content/plugins/role-scoper/lib/agapetry_lib.php:
change
if ( $is_apache ) {
to
if ( $is_apache && function_exists('apache_request_headers') ) {
|
|
|
2:47 pm December 15, 2008
| mkastner
Member
| | | |
|
| posts 9 |
|
|
Looks like I found the cause. The new version automatically has "Filter Uploaded File Attachments" set and I can't even turn that off with my settings. This added the following script to my .htaccess file:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RewriteRule ^(.*)uploaded_images/(.*) /index.php?attachment=$2&scoper_rewrite=1 [NC,L] </IfModule>
# END WordPress
I just deleted this and everything is working fine. Turns out this was the cause of the Nextgen Gallery plugin not working as well. Just a warnign to anyone with the same problem.
|
|
|
3:22 am December 16, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
Yes, I'm sorry to have included a bug in that new feature. However, the problem is not with the .htaccess entry itself. At some point you'll be better off to follow the above code hack (or the next release candidate) to re-activate the attachment filtering. If you think about it, hiding/protecting pages and posts can be a false sense of security if your images are all still available to the public by direct file URL.
|
|
|
3:23 am December 16, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
Also, if you deleted the entire .htaccess file then you've disabled WordPress' own URL rewriting (based on your permalink settings). Further, WordPress will rewrite .htaccess every time you save a page.
|
|
|
3:28 am December 16, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
mkastner said:
I'm also getting this sometimes as well:
Fatal error: Call to undefined function got_mod_rewrite() in /home/content/m/a/t/mattkastner/html/blog/wp-content/plugins/role-scoper/attachment-interceptor_rs.php on line 25
This would occur if a request to your site's frontend triggered the dynamic generation of an attachment URL. Fix by editing attachment-interceptor_rs.php as follows:
change:
got_mod_rewrite()
to:
apache_mod_loaded('mod_rewrite', true)
|
|
|
3:29 am December 16, 2008
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
I'll put out another release candidate to cover these fixes soon.
|
|