NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PhpED hangs upon session_start


Joined: 27 Nov 2009
Posts: 58
Reply with quote
Debugger has recently started locking up upon session_start(). I have PhpED on Windows 7 with a Linux server sharing the web directory via Samba. It has been working perfectly for several years.

The same script works perfectly when directly accessing it independently of PhpED. Furthermore, it runs within PhpED if I just run it but not step into it (i.e. debug it). But when going through debug, it works for a while, but then hangs indefinately when it reaches session_start. PHP and Apache error log files show nothing. After this happens, I cannot even run (i.e. not debug) the script. Furthermore, if I stop the script, and run the following script, it still hans up.
Code:
<?php
session_name('BACKSESSID');
session_start();
?>


What might be causing this, and what are the recommended troubleshooting steps?
View user's profileFind all posts by NotionCommotionSend private message
Guru master

Joined: 24 Jul 2009
Posts: 722
Reply with quote
That issue can happen if the session file is locked by something else, but that doesn't tend to be a PhpED specific issue. When it happens, the lock doesn't appear to timeout.

You mention Samba. Any chance that an antivirus app on Windows is seeing the session file on Linux and locking it?

Whilst probably nothing to do with it, have you checked the Linux server session files directory to see what is in there? Default location on many severs is /var/lib/php/session

I've seen issues with some servers where they stop clearing down the session files and there can be a LOT of files there.

If you set a breakpoint on a statement after the session_start() and then run so that PhpED doesn't step through it, does it get to the breakpoint?
View user's profileFind all posts by plugnplaySend private message


Joined: 27 Nov 2009
Posts: 58
Reply with quote
Thank you plugnplay,

Quote:
That issue can happen if the session file is locked by something else, but that doesn't tend to be a PhpED specific issue. When it happens, the lock doesn't appear to timeout.

You mention Samba. Any chance that an antivirus app on Windows is seeing the session file on Linux and locking it?
I don't think an antivirus app is locking it. How would you recommend testing?
Quote:

Whilst probably nothing to do with it, have you checked the Linux server session files directory to see what is in there? Default location on many severs is /var/lib/php/session

I've seen issues with some servers where they stop clearing down the session files and there can be a LOT of files there.
I only have around 200 sessions in the directory. They are all R/W only by Apache. Many of them are empty. I believe this is caused when PhpED often says something to the effect that there is another session and asks me if I wish to keep showing this message. I often see this message, and don't really know what it means.

Quote:
If you set a breakpoint on a statement after the session_start() and then run so that PhpED doesn't step through it, does it get to the breakpoint?
Never gets passed. I will put a breakpoint just before session_start(), and attempt to single step passed it, but it just stops when it gets there.

Also, note that I have APC installed. Could this be part of the problem? The wizard often gives me a warning about APC, but previously I have had no problems.
View user's profileFind all posts by NotionCommotionSend private message
Guru master

Joined: 24 Jul 2009
Posts: 722
Reply with quote
Next time it hangs, try pressing the Escape key and see what happens. There is a problem with PhpED where sometimes it can display a dialog that is hidden behind PhpED, which you cannot see. Pressing Escape discards it. This happens all the time for me if I debug without properly mapped project directories.

I *have* had issues with APC and debugging, but that was a long time ago and things may have changed. I think the issue I had was more related to PHP files being locked so I couldn't save them.
View user's profileFind all posts by plugnplaySend private message


Joined: 27 Nov 2009
Posts: 58
Reply with quote
Hi plugnplay,

The problem went away for a bit, but now is back.

Escape doesn't do anything. Any other ideas?

Thanks
View user's profileFind all posts by NotionCommotionSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7881
Reply with quote
Try to turn your antivirus OFF. It may snoop into all activity on filesystem and in some cases it may interfere with applications and bring nasty results. If it is antivirus issue, contact antivirus maintainers.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
PhpED hangs upon session_start
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic