PHP Tools for VS2015 debugger crashes with HTTP Status 500
10 posts
• Page 1 of 1
PHP Tools for VS2015 debugger crashes with HTTP Status 500
Hi, My trial just ran out on PHP Tools and though I like it very much I hesitate to buy it because it consistently crashes while debugging. I don't know whether PHP tools is crashing or XDEBUG or CGI or what. All I know is that if I let the debugger rest on a line of code for more than a few seconds, 5 to 10 depending, the webpage switches to an IIS Express 500 Error page and I have to restart the debugger and start over. So I have to be very nimble, and sometimes it just becomes almost impossible to debug. No errors are showing on the PHP error_log file. I've used Visual Studio for years with C# and never had this problem. However, I used the Netbeans IDE for awhile and it crashed while debugging PHP with XDEBUG too. Code Lobster does not crash, but it uses Apaches, and I prefer Visual Studio anyway.
I've tried adjusting some of the general PHP and CGI timeout setting, but nothing helps. Like I said, I like the product, but would like so see this problem resolved before I buy it, although I'm not sure how that is going to happen since the trial has expired. What do you recommend.
Here are my relevant PHP settings.
[XDEBUG]
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_mode = req
xdebug.idekey="php-vs"
xdebug.remote_cookie_expire_time = 3600
xdebug.default_enable = 1
[XDEBUG-2.4.1-5.6-VC11-NTS]
zend_extension="C:\Program Files (x86)\IIS Express\PHP\v5.6\ext\php_xdebug.dll"
I've tried adjusting some of the general PHP and CGI timeout setting, but nothing helps. Like I said, I like the product, but would like so see this problem resolved before I buy it, although I'm not sure how that is going to happen since the trial has expired. What do you recommend.
Here are my relevant PHP settings.
[XDEBUG]
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_mode = req
xdebug.idekey="php-vs"
xdebug.remote_cookie_expire_time = 3600
xdebug.default_enable = 1
[XDEBUG-2.4.1-5.6-VC11-NTS]
zend_extension="C:\Program Files (x86)\IIS Express\PHP\v5.6\ext\php_xdebug.dll"
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Why aren't any of the PHP Tools support people addressing this?
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Okay. I purchased a license. I am now a paying customer. Can you please address my issue now? Thank you.
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Hi Gary,
Thanks for using our tools! Sorry for the delay, we are just preparing a new update.
HTTP Status 500 means
- the PHP Tools, Visual Studio and IIS Express did not crash
- the PHP running your script throws a fatal error
It may be either a configuration error or an error in your entering script file. Sadly even a syntax in the entering script is shown as Server Error 500.
To resolve your issue, please create simple script info.php:
If you still see Server Error 500, there is something wrong with installation.
Please let us know the results of phpinfo()
Thanks for using our tools! Sorry for the delay, we are just preparing a new update.
HTTP Status 500 means
- the PHP Tools, Visual Studio and IIS Express did not crash
- the PHP running your script throws a fatal error
It may be either a configuration error or an error in your entering script file. Sadly even a syntax in the entering script is shown as Server Error 500.
To resolve your issue, please create simple script info.php:
- Code: Select all
<?php phpinfo();
If you still see Server Error 500, there is something wrong with installation.
Please let us know the results of phpinfo()
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
PHP is working fine. I run it all the time. And your PHP TOols debugger works, sort of... The problem is I can't let a debugging session just stay on one line of code for long or the 500 error happens within 5 to 10 seconds. It's like some kind of timeout.
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Hello,
This seems to be session timeout settings of IIS Express. And after this time server kills the request and it results in 500 error. Or it might be PHP timeouting which you could see in php error log (option in php.ini error_log = PATH). I will have to take a close look and try it out, because it's strange that nobody has reported this before.
Thanks,
This seems to be session timeout settings of IIS Express. And after this time server kills the request and it results in 500 error. Or it might be PHP timeouting which you could see in php error log (option in php.ini error_log = PATH). I will have to take a close look and try it out, because it's strange that nobody has reported this before.
Thanks,
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
After some more testing, here's what I've learned about this bug. The timeout happens a consistent 45 seconds after the last time the program was allowed to run. That is, after it was first started or after while debugging the Continue icon was clicked or F5 was pressed. The "timer" seems to be reset at that time and if the program stops on a breakpoint the timeout will occur a consistent 45 seconds after the last time it ran freely.
Stepping through the program does not reset the "timer." This is why it seemed to happen only a few seconds after the last step, and why it seemed to happen more quickly after the last step the longer I debugged. Sooner or later I usually hit the 45 second limit.
I don't see any timeout setting in PHP.ini nor IIExpress applicationi.config that has a value of 45 or so. Do you have any idea what setting might be controlling this?
There are no errors appearing either in the IISExpress log files nor in the PHP error log. The first lines of my program have this:
<?php
error_reporting(E_ALL);
error_log("Starting homepage_procore.php");
After the 500 happens, the only thing in the logfile is this.
[04-Nov-2016 11:52:36 America/Chicago] Starting homepage_procore.php
Stepping through the program does not reset the "timer." This is why it seemed to happen only a few seconds after the last step, and why it seemed to happen more quickly after the last step the longer I debugged. Sooner or later I usually hit the 45 second limit.
I don't see any timeout setting in PHP.ini nor IIExpress applicationi.config that has a value of 45 or so. Do you have any idea what setting might be controlling this?
There are no errors appearing either in the IISExpress log files nor in the PHP error log. The first lines of my program have this:
<?php
error_reporting(E_ALL);
error_log("Starting homepage_procore.php");
After the 500 happens, the only thing in the logfile is this.
[04-Nov-2016 11:52:36 America/Chicago] Starting homepage_procore.php
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
I'm happy to report that I figured it out.
The cause was FastCGI. Which I should have told you was mentioned in the 500 error page.
Detailed Error Information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP-FastCGI
Error Code 0x80070102
The fix was a setting in IIS Express application.config, specifically 'activityTimeout' which defaults to 30 seconds--and which makes it odd that it timed-out at 45... (more about that later) I just increased it to 600 (10 minutes), which should be enough time to run to the kitchen. make a quick sandwich and easily rejoin my debugging session in progress. I increased some of the other timeout settings as well.
You really made a terrific product and, being a long time C# programmer recently converted to PHP, I'm so glad I can use my Visual Studio to do PHP work. Thanks!
<fastCgi>
<application fullPath="C:\Program Files (x86)\IIS Express\PHP\v5.6\php-cgi.exe" arguments="" monitorChangesTo="C:\Program Files (x86)\IIS Express\PHP\v5.6\php.ini" maxInstances="4" idleTimeout="600" activityTimeout="600" requestTimeout="600" instanceMaxRequests="200" protocol="NamedPipe" queueLength="1000" flushNamedPipe="false" rapidFailsPerMinute="10">
<environmentVariables>
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="200" />
<environmentVariable name="PHPRC" value="C:\Program Files (x86)\IIS Express\PHP\v5.6\" />
</environmentVariables>
</application>
</fastCgi>
The cause was FastCGI. Which I should have told you was mentioned in the 500 error page.
Detailed Error Information:
Module FastCgiModule
Notification ExecuteRequestHandler
Handler PHP-FastCGI
Error Code 0x80070102
The fix was a setting in IIS Express application.config, specifically 'activityTimeout' which defaults to 30 seconds--and which makes it odd that it timed-out at 45... (more about that later) I just increased it to 600 (10 minutes), which should be enough time to run to the kitchen. make a quick sandwich and easily rejoin my debugging session in progress. I increased some of the other timeout settings as well.
You really made a terrific product and, being a long time C# programmer recently converted to PHP, I'm so glad I can use my Visual Studio to do PHP work. Thanks!
<fastCgi>
<application fullPath="C:\Program Files (x86)\IIS Express\PHP\v5.6\php-cgi.exe" arguments="" monitorChangesTo="C:\Program Files (x86)\IIS Express\PHP\v5.6\php.ini" maxInstances="4" idleTimeout="600" activityTimeout="600" requestTimeout="600" instanceMaxRequests="200" protocol="NamedPipe" queueLength="1000" flushNamedPipe="false" rapidFailsPerMinute="10">
<environmentVariables>
<environmentVariable name="PHP_FCGI_MAX_REQUESTS" value="200" />
<environmentVariable name="PHPRC" value="C:\Program Files (x86)\IIS Express\PHP\v5.6\" />
</environmentVariables>
</application>
</fastCgi>
Last edited by GCB on November 5th, 2016, 3:13 pm, edited 1 time in total.
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Okay, here's the latest.
Remember I said it timed out out at 45 seconds, but that the activityTimeout setting in application.config was actually 30 seconds? Note: 45 = 30 + 50%.
I wanted to see when it would time out. So I ran a test where I left it in debug mode for 10 minutes (equivalent to my activityTimeout setting of 600 seconds). I expected either 10 minutes or 10 minutes and 15 seconds. But no! It timed out at 15 minutes! Note: 15 = 10 + 50%.
So some intrepid Microsoft programmer decided that the activityTimeout setting for FastCGI should be upped by 50% no matter what setting the user actually wanted!
Remember I said it timed out out at 45 seconds, but that the activityTimeout setting in application.config was actually 30 seconds? Note: 45 = 30 + 50%.
I wanted to see when it would time out. So I ran a test where I left it in debug mode for 10 minutes (equivalent to my activityTimeout setting of 600 seconds). I expected either 10 minutes or 10 minutes and 15 seconds. But no! It timed out at 15 minutes! Note: 15 = 10 + 50%.
So some intrepid Microsoft programmer decided that the activityTimeout setting for FastCGI should be upped by 50% no matter what setting the user actually wanted!
- GCB
- Posts: 9
- Joined: November 1st, 2016, 2:39 am
Re: PHP Tools for VS2015 debugger crashes with HTTP Status 5
Hello,
Thank you for your kind words and for taking time to investigate this and share it with everyone!
I'm going to investigate this also, because if you had the issue chances are the other devs are facing similar thing.
Thanks again!
Thank you for your kind words and for taking time to investigate this and share it with everyone!
I'm going to investigate this also, because if you had the issue chances are the other devs are facing similar thing.
Thanks again!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbeno │ miloslav@devsense.com
-
Miloslav Beno - Posts: 1252
- Joined: January 7th, 2012, 8:36 pm
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 29 guests