php-windows Digest 23 Mar 2005 05:33:26 -0000 Issue 2617
Topics (messages 25782 through 25788):
Re: howto do a backtrace on windows?
25782 by: Jason Barnett
25783 by: M. Sokolewicz
25784 by: Edin Kadribasic
25785 by: M. Sokolewicz
mapfile
25786 by: Rob Agar
Re: How do I enable QDBM dba handler for windows?
25787 by: Justin Tan
hi kani
25788 by: kani
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
Use cygwin / gcc?!?! :P
Is debug_backtrace() unable to give you what you want?
<?php
$old_err = set_error_handler('bt_handler');
trigger_error();
restore_error_handler();
function bt_handler($type, $msg, $file, $line) {
return debug_backtrace();
}
?>
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
actually, this isn't related to the php language itself, but more to the
code beneath it ;)
Since the entire php/apache process segfaults (according to the logs), I
can't do a debug_backtrace() from within php :)
- tul
Jason Barnett wrote:
Use cygwin / gcc?!?! :P
Is debug_backtrace() unable to give you what you want?
<?php
$old_err = set_error_handler('bt_handler');
trigger_error();
restore_error_handler();
function bt_handler($type, $msg, $file, $line) {
return debug_backtrace();
}
?>
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
--- End Message ---
--- Begin Message ---
Do you get a windows dialog with "this application did something really
bad..."?
If you do pressing "Cancel" should start the debugger automatically. You'd
need to compile php in the debug mode in order to get some useful
information out of it though.
Edin
----- Original Message -----
From: "M. Sokolewicz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, March 22, 2005 5:17 PM
Subject: [PHP-WIN] howto do a backtrace on windows?
> hello,
>
> I've compiled PHP (and apache) on windows (using MSVC++.NET), and have
> been doing so for a while now. Lately I've noticed Apache crashing when
> I run certain scripts, so I figured I'd best make a backtrace in such
> cases (since the scripts it crashes on are pretty long and complex, so
> getting to the code that makes it crash is pretty hard). However, I'm
> unsure how I can backtrace what hapenned before it crashed. I've tried
> using the gdb (GNU Debugger), but it returns only "??" for each item in
> the stack, even though PHP itself is built with debug symbols. Maybe
> apache should aswell?? I'm not sure how to continue here... =/
>
> Does anyone have any tips/advice? (except for the "get a precompiled
> snapshot from php.net one)
>
> thanks,
> - tul
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
thanks, that worked :)
"lucky" me... when viewing the callstack, I get:
msvcr70d.dll!strlen() Line 78 Asm
php5ts_debug.dll!_estrdup(const char * s=0x058acf70, char *
__zend_filename=0x0171d6f8, unsigned int __zend_lineno=510, char *
__zend_orig_filename=0x00000000, unsigned int __zend_orig_lineno=0)
Line 400 + 0x9
php5ts_debug.dll!zm_activate_spl(int type=1, int module_number=16,
void * * * tsrm_ls=0x0193beb0) Line 510 + 0x28
php5ts_debug.dll!module_registry_request_startup(_zend_module_entry *
module=0x00b89b28, void * * * tsrm_ls=0x0193beb0) Line 1543 + 0x1b
php5ts_debug.dll!zend_hash_apply(_hashtable * ht=0x018137c0, int
(void *, void * * *)* apply_func=0x01001782, void * * *
tsrm_ls=0x0193beb0) Line 664 + 0x10
php5ts_debug.dll!zend_activate_modules(void * * * tsrm_ls=0x0193beb0)
Line 793 + 0x13
php5ts_debug.dll!php_request_startup(void * * * tsrm_ls=0x0193beb0)
Line 1053 + 0x9
php5apache2.dll!php_apache_request_ctor(request_rec * r=0x005e0b70,
php_struct * ctx=0x005e2948, void * * * tsrm_ls=0x0193beb0) Line 445 + 0xc
php5apache2.dll!php_handler(request_rec * r=0x005e0b70) Line 534 + 0x11
libhttpd.dll!ap_run_handler(request_rec * r=0x005e0b70) Line 153 + 0x25
libhttpd.dll!ap_invoke_handler(request_rec * r=0x005e0b70) Line 368
libhttpd.dll!ap_process_request(request_rec * r=0x005e0b70) Line 253
libhttpd.dll!ap_process_http_connection(conn_rec * c=0x005daa18)
Line 251 + 0x6
libhttpd.dll!ap_run_process_connection(conn_rec * c=0x005daa18) Line
43 + 0x25
libhttpd.dll!ap_process_connection(conn_rec * c=0x005daa18, void *
csd=0x005da948) Line 176 + 0x6
libhttpd.dll!worker_main(long thread_num=2080391471) Line 730
msvcr70.dll!free(void * pBlock=0x058acf70) Line 103 + 0x5
which simply tells me PHP started up fine, transfered control to Apache,
and then died :|
So... that would point to a bug in apache, right?
- tul
Edin Kadribasic wrote:
Do you get a windows dialog with "this application did something really
bad..."?
If you do pressing "Cancel" should start the debugger automatically. You'd
need to compile php in the debug mode in order to get some useful
information out of it though.
Edin
----- Original Message -----
From: "M. Sokolewicz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, March 22, 2005 5:17 PM
Subject: [PHP-WIN] howto do a backtrace on windows?
hello,
I've compiled PHP (and apache) on windows (using MSVC++.NET), and have
been doing so for a while now. Lately I've noticed Apache crashing when
I run certain scripts, so I figured I'd best make a backtrace in such
cases (since the scripts it crashes on are pretty long and complex, so
getting to the code that makes it crash is pretty hard). However, I'm
unsure how I can backtrace what hapenned before it crashed. I've tried
using the gdb (GNU Debugger), but it returns only "??" for each item in
the stack, even though PHP itself is built with debug symbols. Maybe
apache should aswell?? I'm not sure how to continue here... =/
Does anyone have any tips/advice? (except for the "get a precompiled
snapshot from php.net one)
thanks,
- tul
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
hi all
Does anyone have debug map files for the release version of php 4.3.10?
I'm getting a semi-intermittent access violation, but I don't have
access to MSVC to build the debug versions of the dlls.
thanks!
btw, in case this looks familiar to anyone, here's the info I have about
the crash, which happens every few requests, particularly it seems on
reloading pages generated after a POST.
Windows XP pro SP2
Apache/1.3.33 (Win32)
PHP/4.3.10
stack trace:
7C910C27 C:\WINDOWS\system32\ntdll.dll
7C910D5C C:\WINDOWS\system32\ntdll.dll
77C2C2DE C:\WINDOWS\system32\msvcrt.dll
77C39AE9 C:\WINDOWS\system32\msvcrt.dll
77C35F5D C:\WINDOWS\system32\msvcrt.dll
77C35FEC C:\WINDOWS\system32\msvcrt.dll
10047D4E c:\php4\php4ts.dll
or sometimes:
77C46137 C:\WINDOWS\system32\msvcrt.dll
100CA6AE c:\php4\php4ts.dll
60002E50 c:\php4\php4apache.dll
6000186F c:\php4\php4apache.dll
dll base addresses:
0x60000000 php4apache.dll
0x10000000 php4ts.dll
Rob Agar
Web Site Consultant
Wild Lime Media - [EMAIL PROTECTED]
Studio 1, 70 McLeod Street, Cairns 4870
Tel: 07 4081 6677 | Fax: 07 4081 6679
Web and Software Development Services - www.wildlime.com
Search Engine Optimisation Services - search.wildlime.com
Professional Website Hosting Services -www.hostonlime.com.au
Winner 2004 Telstra North QLD Media Awards - Best Website - Online
Content & Information
--- End Message ---
--- Begin Message ---
Hi Edin,
Indeed that may be the case! However, there is a Win32 port for QDBM
that I downloaded from qdbm.sourceforge.net which includes dlls, header
files to compile qdbm support into win apps, and comes with DOS apps
that can create, access and test qdbm files. This may be a new addition
to the QDBM binaries.
I just need to now find out how to get PHP's dba extention to support it
too!
Thanks :)
Justin
--- End Message ---
--- Begin Message ---
hi
--- End Message ---