I am adding Expression Engine to our existing aMember site. (aMember 3.0.9 / EE 1.6.5) I'm trying to 'php_include' protect an Expression-Engine page which has download links to .PDF files in a new_rewrite protected directory. (I want users to get logged in directly aMember in order to retrieve the new_rewrite protected file... ) Any idea's on how to get 'php_include' to set the 'amember_nr' cookie from a EE template? I added the php_include php code to my EE template... so far it: 1. protects the page 2. shows the aMember login form 3. submits the login 4. Returns to the EE page 5. BUT incorrectly returns "Access to this membership area is not allowed. Please go to "Membership information page" to renew or add subscription" At this point the following cookies are set: PHPSESSID exp_last_visit exp_last_activity exp_tracker 6. If I go directly to /amember/member.php, it shows I'm logged-in, and sets these additional cookies: amember_nr exp_userhash exp_uniqueid 7. NOW I can go back to the EE page and... It shows the protected content as it should. I can use the 'php_include' code on a non-EE .php page and it behaves as expected... Setting the amember_nr cookie and showing the protected content . Any idea's on how to get php_include to set the amember_nr cookie from a EE template? I've tried changing PHP parsing stage from input to output and tried removing all EE code from the template. I've been screwing with this for a few days.... trying all sorts of different setups. I bought the ee_plugin and set it up.... but I'm not trying to log-into EE... I need to have user's logged into aMember. Leaving the EE generated download directory open to the public will cause confusion for our users. Any ideas or insight would be much appreciated! (I'll be cross-posting this to the EE forums as well ) --Jason
OK let me try again..... Expression-Engine is eating the amember_nr cookie on login. No cookie no access. Everything else the php_include works. Any idea's on what would screw a amember_nr cookie? Thanks!
Andrey of CGI-Central Support found the solution: PHP: global $_product_id;$_product_id = array(1,3,4);include("/var/www/vhosts/doamin.org/httpdocs/amember/plugins/protect/php_include/check.inc.php"); Saved again by aMemberPro's outstanding support! Thanks Guys!