XAMPP and PHP Sessions

We assign a php session variable with:

$_SESSION[‘UserID’] = $Username;

and later check it with:

if (isset($_SESSION[‘UserID’]))

but it does not work. We check it out with echo but it is always empty. This is odd as the same code works perfectly on the web server running WAMP.

The WAMP server is php4 and the XAMPP usb stick is PHP 5.  Maybe we should add:

session_write_close();

To the program.

The other possibility is that windows security is to blame – this morning after another reboot for an update the trend anti-virus software quarantined the ATI control panel as it is a risk as well as the Snagit screen capture software. Soon you won’t be able to run any applications on windows…

Found a post where the user edited php.ini and changed line #839  from:

;session.save_path = /tmp

to

session.save_path = /tmp

save and restart php. I don’t think that is the problem as i checked the xampp\tmp directory and found the session file. It has the correct contents:

UserID|s:1:”5″;

so why is the code not working? If time permits i will figure it out but time is short…

2 Responses to XAMPP and PHP Sessions

  1. alleningrad says:

    The Joomla extensions problem and drive issues do not seem to be a problem when using MAMP/OSX. I was able to install and run Joomla easily from my Mac.

    Allen

  2. Allen says:

    After not being able to login to Joomla’s admin section, using the username “admin” and pass “joomla”, I discovered that I had inadvertently switched off the Joomla authenticate in the plugins section. Here are my findings:

    Entered phpMyAdmin and changed the jos_plugin SQL section for Authentication-Joomla, where “published” was set to 0, or off. I must have turned off the Joomla authenticate last night, and only had on the gmail authentication published (1).

    I was able to re-encrypt my joomla password with the password generator on the link:

    http://www.teachmejoomla.net/joomla-mambo-tutorials-and-howtos/general-questions/how-to-change-or-recover-joomla-administrator-password.html

    Allen

    “Joomla, Joomla, Joomla!”

Leave a comment