Re: Session problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 21, 2007 11:08 AM, Mathieu Dumoulin <mdumoulin@xxxxxxxxxxxxxxx>
wrote:

> I got a strange problem here, here are the setup details first as this
> seems
> to be a server problem more than a php problem but it is still related to
> php configuration:
>
> Server: Win2003 (latest)
> WebServer: IIS6 (latest)
> PHP: php5.2.2.1
> MySQL: mysql.5
>
> Sites installed in server that may have influence:
>
> www.palliscience.com
> dev.palliscience.com
> maj.palliscience.com
> dev2.palliscience.com
>
> (All sites are installed using php5_ISAPI.dll)
>
> Problem:
>
> When i try to start a session in maj.palliscience.com (Same code as
> everywhere else except the content may differ), the server hangs. I tried
> for two days to find and make sure where this server hang was coming from
> and eventually came to the solid conclusion that my server hang on
> session_start. I tried to add different commands such as
> session_write_close
> at end of my scripts and checked that my sessions where not already open
> by
> using session_id.
>
> The only way i was able to make my sessions work in maj.palliscience.comis
> using the CGI version of PHP, but hell this is causing me problems i never
> thought it would. I'm having problems with headers, and also the $_SERVER
> variable is deadly different.
>
> So my question is simple, what could cause this problem.


Windoze and IIS. =/


> Could it be a clash in the filenames for the session files?


Yes, AFAIK, the session names will clash. Meaning, for each DNS (subdomain,
whatever it is), use a different prefix to avoid clashes:

$_SESSION['www'][...]
$_SESSION['dev'][...]
$_SESSION['maj']...]
etc.

Obviously if some are in production, this is not a trivial change.



> I tried reading a bit the php.ini
> and saw there is a way to split the session files in different folders but
> i
> don't have the expertise nor the famous script the php.ini is talking
> about
> in the session section to fix or alter this info correctly. (I can't start
> tweaking this, there are other sites on the machine that are in production
> mode so i need a final configuration that will work on the first try)
>
> Keep in mind:
>
> 1) I got 3 other sites that sport the same code, only slightly different
> content
> 2) All the sessions in the other sites work marvelously in ISAPI
> 3) Only maj is affected, i tried copying the code to dev2.palliscience.com
> ,
> problem doesn't show.
> 4) I can definitely say my sessions are problematic, i comment out any
> session_start, and the problem nevers shows


This is a stab in the dark, but maybe the problem is not with session_start.
Maybe session_start uses/calls something else which has a negative impact on
your system. So.... you may be addressing the issue, but from the wrong
angle??



> Thanks
>
> Mathieu Dumoulin



Well, I gave you a lot of useless information, but hopefully it sparks a
fire! =D Good Luck.

~Philip

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux