require_once fails during debug

General discussion forum for the Zend Server

require_once fails during debug

Postby sal3415 on Mon Jun 20, 2016 3:03 am

I have a strange problem that only occurs during debugging a project, where require_once statements seem to fail with a Fatal Error. Changing them to require statements allows it to move past that particular problem and onto the next require_once statement, where it then fails. If accessed without debugging, everything seems fine. I'm using Zend Server v9/PHP7 with Zend Studio v13.5 64bit on windows 8.1 64bit. I have a seemingly unusual setup with multiple virtual hosts directly referencing project source (not using deployment). Each virtual host is set up in Zend Studio as a separate PHP server, with its own URL.
sal3415
 
Posts: 30
Joined: Tue Apr 09, 2013 4:43 am

Re: require_once fails during debug (SOLVED)

Postby sal3415 on Mon Jun 20, 2016 4:33 am

This problem was caused by selecting "Local Zend Server" for each vhosts PHP Server in Zend Studio. Once I removed all the PHP servers in Zend Studio, restarted, added the Local Zend Server when prompted, and then manually created entries for my virtual hosts as "Remote Zend Server" instead, the problem disappeared.
sal3415
 
Posts: 30
Joined: Tue Apr 09, 2013 4:43 am

Re: require_once fails during debug

Postby sal3415 on Mon Jun 20, 2016 5:47 am

Scratch that, it's stopped working again. Nothing changed, one minute I stepped through the code to completion, then I immediately started stepping through again and it hit upon this require_once nonsense again. I restarted the computer to see if that helped, to no avail. Looks like it might be a bug in Zend Server or an incompatibility with my multi-vhost setup. Any suggestions are appreciated.
sal3415
 
Posts: 30
Joined: Tue Apr 09, 2013 4:43 am

Re: require_once fails during debug

Postby sal3415 on Mon Jun 20, 2016 6:44 am

Despite confirming via error logs that it is looking in the right place, I decided to prepend the first require_once with the full path set via call: $APP_ROOT = dirname(__DIR__); . The result of this was a 500 Internal Server Error, and after confirming all was correct, extracted the following from error logs:

[Mon Jun 20 15:22:08.681033 2016] [fcgid:warn] [pid 2456:tid 1204] (OS 109)The pipe has been ended. : [client x.x.x.x:2682] mod_fcgid: get overlap result error, referer: http://dev_website/contract
[Mon Jun 20 15:22:08.681033 2016] [core:error] [pid 2456:tid 1204] [client x.x.x.x:2682] End of script output before headers: zf2.php, referer: http://dev_website/contract

Curiously, leaving things exactly as they were for the 500 ISE, and changing only the require_once to require allows it to move past this without the Internal Server Error.

Searching Google for those error messages lead to suggestions about Apache module thread safety. I'm hoping the above details might give someone smarter than I some idea as to the cause.
sal3415
 
Posts: 30
Joined: Tue Apr 09, 2013 4:43 am

Re: require_once fails during debug

Postby liam3446 on Mon Jun 20, 2016 4:33 pm

Hi !

We have a developer license for Zend Server and we have similar problem. Our web appliation works normally with require_once in many places. include_path directive is set correctly in php.ini (accually I tried many different settings for this). However when debugging from Z-Ray (the toolbar in JavaScript) or Firefox toolbar I get a PHP error that a php file from require_once call cannot be found (and the include_path displayed correctly). I was trying debugging with Zend Studio 11.0.2 and Zend Studio 13.5 on Windows 7 64-bit. I am very disappointed with this. How can we solve this issue?
liam3446
 
Posts: 6
Joined: Mon Jun 20, 2016 3:52 pm

Re: require_once fails during debug

Postby liam3446 on Mon Jun 20, 2016 4:58 pm

I used to use normal Apache 2.4 installation with PHP 5.5 and Firefox debug toolbar with ZendDebugger.dll (whih was AFAIR downloaded from Zend official website) and it worked perfectly !
liam3446
 
Posts: 6
Joined: Mon Jun 20, 2016 3:52 pm

Re: require_once fails during debug

Postby liam3446 on Mon Jun 20, 2016 5:24 pm

One more thing: AFAIR debugging in Zend Studio worked with php 5.5 so I suppouse the bug is somewhere in php 7 / ZendDebugger.dll
liam3446
 
Posts: 6
Joined: Mon Jun 20, 2016 3:52 pm

Re: require_once fails during debug

Postby liam3446 on Thu Jun 23, 2016 2:45 pm

Nobody knows ?
liam3446
 
Posts: 6
Joined: Mon Jun 20, 2016 3:52 pm

Re: require_once fails during debug

Postby ramo278 on Wed Jul 27, 2016 2:31 pm

Hi,

I am currently experiencing the exact same issue with require_once when debugging. Has anyone gotten any insight as to what might be the issue here?
ramo278
 
Posts: 2
Joined: Wed Jul 27, 2016 2:28 pm

Re: require_once fails during debug

Postby alex725 on Sun Jul 31, 2016 11:14 am

Thanks for pointing out this issue, this is indeed a bug in Zend Server which we have recently fixed, and should hopefully be included in our next maintenance release.

Best Regards, Alex
Zend Server Team
alex725
 
Posts: 1
Joined: Sun Jul 31, 2016 10:02 am

Next

Return to Zend Server

Who is online

Users browsing this forum: No registered users and 5 guests