Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
Membership not loging in

 

 


Toledoh
Enthusiast

Dec 29, 2011, 2:51 PM

Post #1 of 5 (453 views)
Shortcut
Membership not loging in Can't Post

Hi Guys,

All the functionality of the membership plugin is working fine, the sign-up process, password reminder etc. However, when I log in, I get re-directed as I'm meant to, but it is not activiting me as signed in.

ie. the code below doesn't "show this" and none of the member only functions work. Any suggestions on what to look for? I've attached the pertinent files....

<?php if (@$CURRENT_USER): ?>
show this
<?php endif ?>
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au
Attachments: user-login.php (2.01 KB)
  _members-header.php (1.17 KB)


Tom P
User


Dec 30, 2011, 12:03 PM

Post #2 of 5 (442 views)
Shortcut
Re: [Toledoh] Membership not loging in [In reply to] Can't Post

Hi Tim,

Could you provide the page that the user is being redirected to after login so I can check it over?

Also I wanted to check that you have the following:

Code
// load viewer library 
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('','../','../../','../../../','../../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }

// error checking
if (!@$GLOBALS['WEBSITE_MEMBERSHIP_PLUGIN']) { die("You must activate the Website Membership plugin before you can access this page."); }

at the top of each page that will contain member only information.

Thanks,

Tom


Toledoh
Enthusiast

Dec 30, 2011, 2:43 PM

Post #3 of 5 (440 views)
Shortcut
Re: [Tom P] Membership not loging in [In reply to] Can't Post

Hi Tom,

Thanks for this.

I've sent an email through to support with FTP access which may help you more?

I don't have that error check on each page, but adding it didn't seem to make a difference.

I do have a age verification script that may be causing some issue?

Cheers,
Tim
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au


Jason
Staff / Moderator


Jan 2, 2012, 11:46 AM

Post #4 of 5 (423 views)
Shortcut
Re: [Toledoh] Membership not loging in [In reply to] Can't Post

Hi,

This issue was resolved. Here are the details in case anyone else runs into a similar problem.

Problem:
- When logged into CMS Builder, if you access a .php page in another directory that includes viewer_functions.php, your session would be destroyed and you have to log into CMS Builder again. If you logged in with the website membership plugin and then went to CMS Builder the same thing would happen.

Cause:
- The most likely cause is that your server is running a program called Suhosin, which is a php security script, which usually causes a lot more problems than it solves. In the cmsAdmin folder there is a php.ini file. It is this file that interferes with Suhosin, setting it to it's strictest level.

Solution:
- delete the php.ini file from the cmsAdmin folder, or rename it. This should resolve the issue. Note that if you upgrade CMS Builder, you will probably have to do this again.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Programmer 
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/ 


Toledoh
Enthusiast

Jan 2, 2012, 1:50 PM

Post #5 of 5 (421 views)
Shortcut
Re: [Jason] Membership not loging in [In reply to] Can't Post

Thanks for that Jason - no wonder I couldn't figure it out!

Thanks for going to that effort!
Cheers,

Tim Forrest
Toledoh Enterprises
www.toledoh.com.au