Hi All,
My company has recently switched its servers from apache 1.3 to IIS 6 ...
not for technical but for business reasons. Well, we have tried using
different versions of PHP, 4.3.7, 4.3.8, 4.4.2 ... but with every ISAPI
config, we are getting "PHP has encountered an access violation at XXXX" ...
I have searched extensively across bugs.php.net ... but could not really
find much helpful solutions. I know that without extra debug information,
its difficult for anyone here to be much helpful but my problem is I have
tried IIS's Microsoft Diagnostics Toolkit ... without much help. IIS does
not die when the error occurs and I cannot get the information that the "how
to file bug report" page says.
I would appreciate if anyone can help me in finding out how to obtain extra
information from php ... I am not able to find a debug pack for PHP 4 ....
Thanks
Sharad
Hi Sharad
I would appreciate if anyone can help me in finding out how to obtain extra
information from php ... I am not able to find a debug pack for PHP 4 ....
Edin recently compiled one..
http://php.emini.dk/misc/php-4.4.3-dev-Win32-debug.zip
Hannes Magnusson wrote:
Hi Sharad
I would appreciate if anyone can help me in finding out how to obtain
extra
information from php ... I am not able to find a debug pack for PHP 4
....
The sad bit is, it's totally unnecessary to have a specific debug build,
but the maintainers have never taken advantage of the fact.
Leave /O options alone in the release build (optimize to your hearts' content),
leave /MD for the run time, but compile with the /Zi flag (ensuring the sources
don't clash with the output binary name, or else use /Fd"othername" to compile
the sources with a different .pdb filename to avoid a collision), and finally
link /debug /opt:ref. The result is the -same- .dll or .exe as the original
release style, but an -external- .pdb matching the binary - which Dr. Watson
or any other windows debugger can use and spit out backtraces.
Windows Apache HTTP Server releases offer this; the corresponding .pdb's are
zipped up in their very own package. Normally they don't help a user. But if
the user is crashing, unzipping the .pdb files that correspond to their release
provides all the backtrace info required.
In fact, with the binaries + pdb's - the user.dmp crash file can be ripped open
on a dev box which has the appropriate debugging tools, just like using an
non-stripped unix binary with gdb.
Bill
I haven't been able to use such tool with PHP with the .pdb files myself. If
you have success, could you please write a tutorial for our bugs.php.net
site?
That tool teoricaly should also find memory leaks, but well, I can't work
with it.. Wine with valgrind is much easier :)
Nuno
----- Original Message -----
From: "Sharad Gupta" sharadg@gmail.com
To: internals@lists.php.net
Sent: Saturday, April 29, 2006 2:46 AM
Subject: [PHP-DEV] Help with generating a stack trace on IIS6
Hi All,
My company has recently switched its servers from apache 1.3 to IIS 6 ...
not for technical but for business reasons. Well, we have tried using
different versions of PHP, 4.3.7, 4.3.8, 4.4.2 ... but with every ISAPI
config, we are getting "PHP has encountered an access violation at XXXX" ...
I have searched extensively across bugs.php.net ... but could not really
find much helpful solutions. I know that without extra debug information,
its difficult for anyone here to be much helpful but my problem is I have
tried IIS's Microsoft Diagnostics Toolkit ... without much help. IIS does
not die when the error occurs and I cannot get the information that the "how
to file bug report" page says.
I would appreciate if anyone can help me in finding out how to obtain extra
information from php ... I am not able to find a debug pack for PHP 4 ....
Thanks
Sharad
It seems I was able to compile a debug version of php 4.4.2 myself using
MSVC++ 6 with php4dll.dsw... but when I point IIS to ISAPI dll ... on all
scripts, I get "input file not found" error ...
when I dump a phpinfo using "php -i" ... it tells me that I am using PHP in
CGI/FastCGI mode ... but I dont recall doing that intentionally ... anyonw
has an idea about this behaviour ?
also, what is the difference between php4dll.dsw & php4.dsw ?
thanks for your help
I haven't been able to use such tool with PHP with the .pdb files myself.
If
you have success, could you please write a tutorial for our bugs.php.net
site?
That tool teoricaly should also find memory leaks, but well, I can't work
with it.. Wine with valgrind is much easier :)Nuno
----- Original Message -----
From: "Sharad Gupta" sharadg@gmail.com
To: internals@lists.php.net
Sent: Saturday, April 29, 2006 2:46 AM
Subject: [PHP-DEV] Help with generating a stack trace on IIS6Hi All,
My company has recently switched its servers from apache 1.3 to IIS 6 ...
not for technical but for business reasons. Well, we have tried using
different versions of PHP, 4.3.7, 4.3.8, 4.4.2 ... but with every ISAPI
config, we are getting "PHP has encountered an access violation at XXXX"
...I have searched extensively across bugs.php.net ... but could not really
find much helpful solutions. I know that without extra debug information,
its difficult for anyone here to be much helpful but my problem is I have
tried IIS's Microsoft Diagnostics Toolkit ... without much help. IIS does
not die when the error occurs and I cannot get the information that the
"how
to file bug report" page says.I would appreciate if anyone can help me in finding out how to obtain
extra
information from php ... I am not able to find a debug pack for PHP 4 ....Thanks
Sharad
Ok, when I compile a "release" version .. I dont get "no input file
specified" error when opening php scripts in browser ..
But when I compile "debug" version, I get that error ... can any one shed
some light on this behaviour .. is it intended behaviour and what can I do
to rectify it ?
Thanks
It seems I was able to compile a debug version of php 4.4.2 myself using
MSVC++ 6 with php4dll.dsw... but when I point IIS to ISAPI dll ... on all
scripts, I get "input file not found" error ...when I dump a phpinfo using "php -i" ... it tells me that I am using PHP
in CGI/FastCGI mode ... but I dont recall doing that intentionally ...
anyonw has an idea about this behaviour ?also, what is the difference between php4dll.dsw & php4.dsw ?
thanks for your help
Switching to linking against the release build of libc should help.
Change /MDd to /MD in the dsp/dsw or whatever it is.
--Wez.
Ok, when I compile a "release" version .. I dont get "no input file
specified" error when opening php scripts in browser ..But when I compile "debug" version, I get that error ... can any one shed
some light on this behaviour .. is it intended behaviour and what can I do
to rectify it ?Thanks
It seems I was able to compile a debug version of php 4.4.2 myself using
MSVC++ 6 with php4dll.dsw... but when I point IIS to ISAPI dll ... on all
scripts, I get "input file not found" error ...when I dump a phpinfo using "php -i" ... it tells me that I am using PHP
in CGI/FastCGI mode ... but I dont recall doing that intentionally ...
anyonw has an idea about this behaviour ?also, what is the difference between php4dll.dsw & php4.dsw ?
thanks for your help
Ok, I was finally able to compile a release version of PHP 4.4.2 with debug
flags. When running as a ISAPI module under IIS6 on a windows server 2003
SP1 machine, I was able to observe it break on "Access Violation" exception
catch block in php4isapi.c
But the call trace and the registers values dont make much sense to me. Can
you point me to extra information or some extra instructions to be better
able to understand whats really causing the access violations issue.
1.) Call trace & registers from one test:
HttpExtensionProc(_EXTENSION_CONTROL_BLOCK * 0x00d5f8b0) line 902
W3ISAPI! 5a322991()
W3CORE! 5a3968ff()
W3CORE! 5a3a66f9()
W3CORE! 5a394c6f()
W3CORE! 5a394bf0()
W3CORE! 5a394baf()
W3CORE! 5a394fab()
W3DT! 5a3618b2()
W3DT! 5a3616ca()
W3TP! 5a3024de()
W3TP! 5a3026bc()
W3TP! 5a301db9()
KERNEL32! 77e66063()
EAX = 00000033 EBX = 00000000 ECX = 000050E0
EDX = 00000000 ESI = 00000000 EDI = 00000000
EIP = 01652488 ESP = 00D0F964 EBP = 00D0FE40
EFL = 00000212 CS = 001B DS = 0023 ES = 0023
SS = 0023 FS = 003B GS = 0000 OV=0 UP=0 EI=1
PL=0 ZR=0 AC=1 PE=0 CY=0
ST0 = +0.00000000000000000e+0000
ST1 = +0.00000000000000000e+0000
ST2 = +0.00000000000000000e+0000
ST3 = +0.00000000000000000e+0000
ST4 = +0.00000000000000000e+0000
ST5 = +0.00000000000000000e+0000
ST6 = +0.00000000000000000e+0000
ST7 = +4.50000000000000000e+0001 CTRL = 027F
STAT = 0020 TAGS = FFFF EIP = 01C4AC10
CS = 001B DS = 0023 EDO = 01CA4DB8
2.) from another test:
HttpExtensionProc(_EXTENSION_CONTROL_BLOCK * 0x00d7b0d0) line 900
W3ISAPI! 5a322991()
W3CORE! 5a3968ff()
W3CORE! 5a3a66f9()
W3CORE! 5a394c6f()
W3CORE! 5a394bf0()
W3CORE! 5a394baf()
W3CORE! 5a394fab()
W3DT! 5a3618b2()
W3DT! 5a3616ca()
W3TP! 5a3024de()
W3TP! 5a3026bc()
W3TP! 5a301db9()
KERNEL32! 77e66063()
EAX = 01652343 EBX = 00000000 ECX = 00000000 EDX = 00000000 ESI = 00000000
EDI = 00000000 EIP = 01652442 ESP = 157DF964 EBP = 157DFE40 EFL = 00000246
CS = 001B DS = 0023 ES = 0023 SS = 0023 FS = 003B GS = 0000 OV=0 UP=0 EI=1
PL=0 ZR=1 AC=0 PE=1 CY=0
157DFE20 = 157DCA50
ST0 = +0.00000000000000000e+0000 ST1 = +0.00000000000000000e+0000
ST2 = +0.00000000000000000e+0000 ST3 = +0.00000000000000000e+0000
ST4 = +0.00000000000000000e+0000 ST5 = +0.00000000000000000e+0000
ST6 = +0.00000000000000000e+0000 ST7 = +4.50000000000000000e+0001
CTRL = 027F STAT = 0020 TAGS = FFFF EIP = 01C4AC10 CS = 001B DS = 0023
EDO = 01CA4DB8
Switching to linking against the release build of libc should help.
Change /MDd to /MD in the dsp/dsw or whatever it is.--Wez.
Ok, when I compile a "release" version .. I dont get "no input file
specified" error when opening php scripts in browser ..But when I compile "debug" version, I get that error ... can any one
shed
some light on this behaviour .. is it intended behaviour and what can I
do
to rectify it ?Thanks
It seems I was able to compile a debug version of php 4.4.2 myself
using
MSVC++ 6 with php4dll.dsw... but when I point IIS to ISAPI dll ... on
all
scripts, I get "input file not found" error ...when I dump a phpinfo using "php -i" ... it tells me that I am using
PHP
in CGI/FastCGI mode ... but I dont recall doing that intentionally ...
anyonw has an idea about this behaviour ?also, what is the difference between php4dll.dsw & php4.dsw ?
thanks for your help