Hi, I'm trying to diplay a little "You are logged in as..." line on my website that is protected via amember. My approach now was to include the Lite.php into my homepage and to aquire the username information from there. But if I include it by "require_once 'amember/library/Am/Lite.php'" it gives me the following error message: There seems to be a problem with the mysql socket connection in that context. However, the system is working fine so far. How can I fix this or is there maybe an easier way for me to aquire the username information to display it in my info line?
Can you post up the section of script showing call to 'lite.php'? '/mywebsite/amember/library/Am/Lite.php' is not a valid php include, or require statement. It should be the full path to lite.php such as: PHP: '/home/myusername/public_html/amember/library/Am/Lite.php'
I'm sorry, I've edited the path in the error message above because I thought it wouldn't matter. The original error message is: I tried to include lite.php via the code that is suggested in the documentation: I'm nearly finished with my integration of amember and the system runs just fine. If there is any other method to echo the name of the active user that would also help me.
Ok, I have now found this page here on my search for an alternative approach: http://manual.amember.com/Integrating_aMember_Pro_with_website under the headline "Add Member Information to PHP Pages" it says to add this line at the very top of the page (does this mean above the <html> tag and the doctype info?): And this code to output the user name: When I do that I receive the following Warning on my website: The line that should print "Welcome, [UserFirstName] [UserLastName]" is only printing "Welcome," And just so that you know what I'm trying to do: I have a homepage made of php-files which is protected via the folder protection from amember. The homepage is only accessable if you are logged in in amember. I want to display the name of the active user in a small title bar. Maybe someone can help me with this. I'm really just trying to display that name.
This approach is for version 3 and deprecated. It will not work with v4. Please submit a ticket and we will help. Seems MySQL connection is configured via socket and it causes problems (may be Lite.php does not understand it). Could you please attach to ticket copy of your file with Lite code + file amember/application/configs/config.php