Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: evgenydeep on May 23, 2008, 11:45:55 AM

Title: problem with Session and\or PHP settings
Post by: evgenydeep on May 23, 2008, 11:45:55 AM
Strange bug appear on all my php-scripts last day.

Problem began from the moment when I log in in my fresh installed SMF but can't logout.
Then in each php-scripts(webinstall.php convert.php) from SMF I runned I got a few notices-errors, like:

Notice: Undefined index: install_info in /home/forumgr/public_html/smf003/webinstall.php on line 606
Notice: Undefined variable: _SESSION in /home/forumgr/public_html/smf003/webinstall.php on line 865
Warning: Invalid argument supplied for foreach() in /home/forumgr/public_html/smf003/webinstall.php on line 865

Other php, not from SMF, looks working well.
Previously, last few weeks, I never got such messages.
I supoose that ths is problem may be with PHP-settings.
Please advise.
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 23, 2008, 01:53:59 PM
Mostly I worry about error with session.
In each php-script I ran exist problem with Session.

Notice-error present everywhee
Notice: Undefined variable: _SESSION
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 24, 2008, 03:54:53 PM
Is someone meet similar problem?
Title: Re: problem with Session and\or PHP settings
Post by: SlammedDime on May 24, 2008, 04:15:23 PM
If _SESSION isn't being found, then you have an issue with the php configuration and you should contact your host so they can figure out why.
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 24, 2008, 05:02:46 PM
I'm the hoster owner :-) I have dedicated server.
My admin don't know what  it can be.

Look here:
http://www.simplemachines.org/community/index.php?topic=236451
This problem exist not me only.
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 25, 2008, 02:24:52 AM
I have installed is about 5-10 SMF for test purposes on different accounts(under Cpanel) on my dedicated server - I'm trying to convert my big forum.
And on all of them exit problem with session.
And it looks the same, like sesasso's problem.

I try to login on any of this SMF - ok. But I can't logout or go to the admin part, I got message
"Session verification failed. Please try logging out and back in again, and then try again."

Last month all scripts working well, but few days ago... such problem appear.
As I know(as dedicated server owner) - no changes was in PHP.ini, moreover, no any upgrades...or other.
So, for me it looks strange why such problem appear.

Becasue this problem appear on all installed SMF and affected on all new runned scripts as I show in my topic... it looks that problem is with server settings, PHP settings.

My first guess was that  PHP can't access rights to directory session.save_path. But with this all ok.
I have  session.save_path=/tmp

Delete then re-install all SMF is not correct way :-) I guess problem is with settings, PHP-settings. But what settings???
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 25, 2008, 02:40:16 AM
PS: problem is not with local cookies from my PC, I tried from different computers, I even tried from Lynx on the same dedicated server.
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 25, 2008, 06:25:48 AM
Deleting cookies of course help to logout :-)
But it is not decide the problem.

Recentle, I tried to install TinyPortal on one of SMF.
I found person who had similar problem:
http://www.simplemachines.org/community/index.php?topic=228927

How unsuccessfull installation of TinyPortal can affect on all SMF-installations on the server?
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 26, 2008, 08:21:41 AM
Also, I noticed, when I try to login, then first time it shows "incorrect login", then at second time I log-in without problems. I think this is due to session issue either.

During login following errors logged in DB:
2: session_start() [&lt;a href='function.session-start'&gt;function.session-start&lt;/a&gt;]: Cannot find save handler files   <br />/home/forumgr/public_html/smf/Sources/Load.php<br />1950

Password incorrect - &lt;span class=&quot;remove&quot;&gt;deep&lt;/span&gt;

2: session_start() [&lt;a href='function.session-start'&gt;function.session-start&lt;/a&gt;]: Cannot find save handler files   <br />/home/forumgr/public_html/smf/Sources/Load.php<br />1950

2: session_destroy() [&lt;a href='function.session-destroy'&gt;function.session-destroy&lt;/a&gt;]: Trying to destroy uninitialized session<br />File: /home/forumgr/public_html/smf/Sources/Subs-Auth.php<br />Line: 174

2: session_start() [&lt;a href='function.session-start'&gt;function.session-start&lt;/a&gt;]: Cannot find save handler files   <br />File: /home/forumgr/public_html/smf/Sources/Load.php<br />Line: 1950
Title: Re: problem with Session and\or PHP settings
Post by: vbgamer45 on May 26, 2008, 08:34:23 AM
Check your php.ini for
session.save_path = /tmp

And check that the path exists and that the directory has the correct permissions this is needed for sessions.
Title: Re: problem with Session and\or PHP settings
Post by: evgenydeep on May 26, 2008, 12:26:34 PM
vbgamer, thanks,  yes
session.save_path = /tmp
of course.

Finally: I'm tired to found where is problem, so I roll-back my previous working php.ini
and all become workable again.
My guess why it was so: Last time, when I edit php.ini I use CPanel WHM  to save it.
WHM saved almost all parameters existent in php.ini in double quotes. I roll back to the same php.ini, but without double quotes, and all become workable....
"magic @#$% quotes" :)