Community Support Forums — WordPress® ( Users Helping Users ) — 2010-07-22T23:43:17-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=381 2010-07-22T23:43:17-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1758#p1758 <![CDATA[Re: Post/Page restriction not working (local issue?)]]> ~ Thanks again.

Statistics: Posted by Jason Caldwell — July 22nd, 2010, 11:43 pm


]]>
2010-07-14T23:14:31-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1566#p1566 <![CDATA[Re: Post/Page restriction not working (local issue?)]]>

Statistics: Posted by scripty — July 14th, 2010, 11:14 pm


]]>
2010-07-14T23:08:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1564#p1564 <![CDATA[Re: Post/Page restriction not working (local issue?)]]> s2Member Pro, with unlimited domain licensing and the s2Clean Theme. ~Thanks again for the assistance. Much appreciated!

Just send me a list of domains and/or IP addresses via email and I'll send over your licenses on demand.

Statistics: Posted by Jason Caldwell — July 14th, 2010, 11:08 pm


]]>
2010-07-14T23:01:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1563#p1563 <![CDATA[Re: Post/Page restriction not working (local issue?)]]> - This will be committed to s2Member v3.1.3+ ... to be released soon.

Statistics: Posted by Jason Caldwell — July 14th, 2010, 11:01 pm


]]>
2010-07-14T22:54:33-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1562#p1562 <![CDATA[Re: Post/Page restriction not working (local issue?)]]> Statistics: Posted by scripty — July 14th, 2010, 10:54 pm


]]>
2010-07-14T22:49:23-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1561#p1561 <![CDATA[Re: Post/Page restriction not working (local issue?)]]>
Code:
else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"] && !preg_match ("/^localhost(\:[0-9]+)?$/i", $_SERVER["HTTP_HOST"]))

Statistics: Posted by Jason Caldwell — July 14th, 2010, 10:49 pm


]]>
2010-07-14T22:33:14-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1560#p1560 <![CDATA[Re: Post/Page restriction not working (local issue?)]]>
Not sure if this is helpful or not, but with MAMP - it goes through a port... so the URL looks like this:
http://localhost:8888/

Statistics: Posted by scripty — July 14th, 2010, 10:33 pm


]]>
2010-07-14T22:13:42-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1558#p1558 <![CDATA[Re: Post/Page restriction not working (local issue?)]]>
So maybe a better solution is this:
Code:
else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"] && !preg_match ("/^localhost$/i", $_SERVER["HTTP_HOST"]))

If you have a minute to test this on your MAMP installation, I would be very grateful.

Statistics: Posted by Jason Caldwell — July 14th, 2010, 10:13 pm


]]>
2010-07-14T21:42:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1556#p1556 <![CDATA[Re: Post/Page restriction not working (local issue?)]]> ::1
I'm not a MAMP expert, so I don't know why that is - but that's the value it returns for $_SERVER["REMOTE_ADDR"]

Thanks!
-Jennifer

Statistics: Posted by scripty — July 14th, 2010, 9:42 pm


]]>
2010-07-14T21:02:04-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1555#p1555 <![CDATA[Re: Post/Page restriction not working (local issue?)]]>
Yes, there is one minor change required.
Inside /includes/functions/is-systematic.inc.php, at line #37

Change this:
Code:
else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"])

To this:
Code:
else if ($_SERVER["REMOTE_ADDR"] === $_SERVER["SERVER_ADDR"] && $_SERVER["REMOTE_ADDR"] !== "127.0.0.1")

If that does not work, you can change 127.0.0.1 to whatever your localhost IP is. I'll have this updated in the next release so that local installations will work without this manual edit.

Statistics: Posted by Jason Caldwell — July 14th, 2010, 9:02 pm


]]>
2010-07-14T18:17:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=381&p=1551#p1551 <![CDATA[Post/Page restriction not working (local issue?)]]>
Does this plugin have any known issues running on a locally hosted copy of WordPress (I'm running MAMP)

Thanks in advance for any help!
-Jennifer

Statistics: Posted by scripty — July 14th, 2010, 6:17 pm


]]>