I get almost the same problem as kartlink and I’ve posted some background on your blog comments as well.
I am using this plugin in conjunction with Page Access, but it doesn’t work by itself either.
The errors I get when used with Page Access are:
When I am logged in as a user without access privileges for the page:
code
WordPress database error: [You have an error in your SQL syntax near ‘; ‘ at line 7]
select distinct page from wp_page_access_group_line_item inner join wp_page_access_user_line_item using(group_id) where wp_page_access_user_line_item.user_id = 1 order by page;
Warning: Invalid argument supplied for foreach() in /home/virtual/site14/fst/var/www/html/wp-content/plugins/page-restriction.php on line 221
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 129
code
When I am not logged in:
code
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 109
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 110
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 111
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 112
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site14/fst/var/www/html/wp-content/themes/default/header.php:5) in /home/virtual/site14/fst/var/www/html/wp-includes/pluggable-functions.php on line 114
code
When I use Page Restriction by itself, I get the above error as well.
I’ve tried both WP 1.5.1.3 and WordPress 1.5.2, neither solves the problem. WordPress and other plug-ins run perfectly, so that’s why I am wondering if this is due to something in the Page Restriction script.
I am using MediaTemple.net as my host.
Apache: 2.0.46
PHP: 4.3.10
MySQL: 3.23.58
Their PHP runs in safe mode (https://www.php.net/manual/en/features.safe-mode.php), I don’t know if this has anything to do with the problem but at a quick glance it shouldn’t.
I have been able to run an identical installation successfully at another host with Apache 1.3.31, PHP 4.3.9, and MySQL 4.1.12.