Reply to Re: Reentrant POST hangs the session

Your name:

Reply:


Posted by Erwin Moller on 02/17/06 12:15

a wrote:

>> Is that test done WITH sessions enabled?
>> Then every request to ANY script will wait that uses that session.
>>
>
> Yes, the session is enabled (see below why)- sorry for not mentioning
> this.

Hi a,

>
>> That is why is advised you to disable session if you test this.
>> If you both have session ebabled AND doing systemscalls, you do not know
>> what you are testing.
>>
>
> Since this script will be used in a production environment with the
> session enabled due to the nature of the application, and the error also
> occurs when the session is enabled, I thought that I didn't need to
> disable it. The session should actually prevent such an issue from
> happening alogether, since it serializes access to a script.

No, that is NOT the case.
But this is excactly what I was trying to tell you/warn you about:
PHP runs requests to all kind of pages simultaniously.
Also requests to the same script(!).
And even requests to the same script by the same user. (Unless a session is
involved)

The only reason PHP waits before executing a script is because THE SAME
SESSION IS IN USE. This can be in the same script, or in another script.
The execution will ONLY be postphoned if the session is locked (in use).

That is why you should try to disable it if you want to test the systemcall.

If you cannot test this for some reason, you'll have a harder time debug
your problem.

But you found a way (futher down this text).

>
>> Also, the process called by exec starts and
>>> ends fine, it doesn't hang. I even changed it to exit immediately, just
>>> to
>>> make sure there were no other interferences. So the script hangs between
>>> the exit of my process and its return to the script.
>>
>> Are you sure?
>> I mean: Did you leave some trace that the beginning of the php-script DID
>> run untill it reached the systemcall?
>>
>
> Yes, I created a diagnostic file where the script writes trace statements
> in various points, and also monitored the process exec-ed by the script,
> which is no longer in the list of active processes by the time the script
> hangs.

Ok, so that proves that the script started, right?
In that case you know you didn't have a sessionproblem indeed, otherwise it
just didn't start.

Conclusion: Your systemcall makes the script hang, but the PHPprocess is
terminated, and didn't return anything, not even the beginning of the
response (headers and such).

Some thing you could look at:
Are you using output buffering? obstart();
If so, flush the output before calling the systemcall.

You could also try to see if the script returns anything by calling it with
something else than a webbrowser (like wget).

Well, good luck, I am out of ideas.

Regards,
Erwin Moller

>
> Thanks,
>
> A

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация