[solved] Session Problem

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
beachdiddi

[solved] Session Problem

Post by beachdiddi »

Hi Everybody,

i´ve installed CMSMS 1.4.1 successfully although the SafeMode is ON on the server.
Now the frontend page is shown and the login screen for the backend ist shown as well.
But when I try to login it seems, that nothing happens.
So I switched DEBUG from OFF to ON. Afterwards the following output is produced:

Code: Select all

Debug: (3.3000000000061E-05) - (775728)

loading smarty

Debug: (0.01578) - (1073072)

loading adodb

Debug: (0.021185) - (1163768)

loading page functions

Debug: (0.03146) - (1335976)

loading content functions

Debug: (0.042921) - (1567472)

loading pageinfo functions

Debug: (0.045135) - (1598584)

loading translation functions

Debug: (0.046637) - (1618704)

loading events functions

Debug: (0.051469) - (1715200)

loading php4 entity decode functions

Debug: (0.05953) - (1954368)

done loading files

Debug: (0.095087) - (2709208)

<br>
(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs<br>
 Error (0): <br>

Debug: (0.1046) - (2772120)

<br>
(mysql): SELECT * FROM cms_userplugins<br>
 Error (0): <br>

Debug: (0.25045) - (3354800)

<br>
(mysql): SELECT * FROM cms_modules WHERE active = 1 ORDER by module_name<br>
 Error (0): <br>

Debug display of 'End of include':(0.372556) - (5230528)
Debug: (0.373896) - (5191152)

No session found.  Now check for cookies

Debug: (0.374074) - (5191320)

No cookies found.  Redirect to login.

Debug: (0.374467) - (5193024)

debug is:

Debug: (0.375686) - (5203968)

Debug in the page is: 
I think there is a problem with the session. There is no session found.
So I tried to fix the problem and found the following Troubleshootinginformation:
Install went well, but I can't login to the admin

It seems the install went well. You can even browse the site. But you can't login to the admin console. You may face either:

    * a server side PHP session problem
    * a browser side cookie problem

Solution: enable server side PHP sessions and let the admin's browser accept cookies (at least transient cookies from your site).

    * maybe you used the wrong userid/password?
Session is activated on the server. See the output of phpinfo() in the attached file.

Has anybody any suggestion?

best regards,
beachdiddi
Attachments
Bild 1.jpg
Last edited by beachdiddi on Mon Dec 01, 2008 8:43 pm, edited 1 time in total.
igel
Forum Members
Forum Members
Posts: 39
Joined: Wed May 21, 2008 8:12 pm

Re: Session Problem

Post by igel »

Hi,

sessions don't work because 'session_save_path'  has no value.

If this can't be fixed by your provider or by using your own php.ini, you might look for all instances of
'session_start();'
and add this line with your path in front of it:

session_save_path('/some/valid/full/path/that/is/writable/and/preferrably/outside/the/web/server/document/root/');

Concerning Cookies: A Personal Firewall (like Zone Alarm or Norton) might block your Cookies too.

Kind regards
Inge
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Session Problem

Post by calguy1000 »

CMS Made simple does not support most safe mode environments.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
beachdiddi

Re: Session Problem

Post by beachdiddi »

igel wrote: Hi,
sessions don't work because 'session_save_path'  has no value.
If this can't be fixed by your provider or by using your own php.ini, you might look for all instances of
'session_start();'
and add this line with your path in front of it:
session_save_path('/some/valid/full/path/that/is/writable/and/preferrably/outside/the/web/server/document/root/');
Concerning Cookies: A Personal Firewall (like Zone Alarm or Norton) might block your Cookies too.

Kind regards
Inge
I´ve tried this already.
I´ve created a session_save_path (in include.php before the call for session_start() ) and everytime I call the admin/index.php two files are created. One has a size of 81kb and the other one is empty (0kb). So I assume that the session is created.
But using the Debug Mode one can see "No session found".
So the session has been created but cmsms can´t read (or find) the session.
calguy100 wrote:CMS Made simple does not support most safe mode environments.
Well... I´m trying to figure it out. My Webhoster won´t set the SafeMode to OFF. My only chance is sampling...
beachdiddi

Re: Session Problem

Post by beachdiddi »

Fixed!  ;D

Somebody gave me the hint to call the session_save_path() in another line of include.php and it works now.
I tried it this way and it didn´t work:

Code: Select all

$dirname = dirname(__FILE__);
require_once($dirname.DIRECTORY_SEPARATOR.'fileloc.php');

//try it here
session_save_path('/path/to/session');

$session_key = substr(md5($dirname), 0, 8);
#Setup session with different id and start it
@session_name('CMSSESSID' . $session_key);
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', 0);
if(!@session_id())
{
    #Trans SID sucks also...
    @ini_set('url_rewriter.tags', '');
    @ini_set('session.use_trans_sid', 0);
    @session_start();
}
But I had to use it this way:

Code: Select all

$dirname = dirname(__FILE__);
require_once($dirname.DIRECTORY_SEPARATOR.'fileloc.php');
$session_key = substr(md5($dirname), 0, 8);
#Setup session with different id and start it
@session_name('CMSSESSID' . $session_key);
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', 0);
if(!@session_id())
{

    //this line works fine
    session_save_path('/path/to/session');

    #Trans SID sucks also...
    @ini_set('url_rewriter.tags', '');
    @ini_set('session.use_trans_sid', 0);
    @session_start();
}
This works fine....

@calguy100: I´m using cmsms since 30 minutes now and I´m still testing some of the different functions and it seems that it works despite of the SAFE_MODE. Hopefully I won´t find any mad error.

regards,
beachdiddi
Locked

Return to “[locked] Installation, Setup and Upgrade”