Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Brian Foddy
Andi Gutmans wrote: Did you compile with debug on or off? Please try without debug in both PHP and your module and let us know if something changes. Also can you try and load it via php.ini (extension=module.so) and not with dl(). I rebuilt php 4.0.4p1 with debug off, rebuilt my module

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Brian Foddy
One more strange behavior I just saw. Take this little script: ? phpinfo (); $tux = tux_tpalloc (TUX_FML32, , 5000); print $tux; tux_tpfree ($tux); print $tux; ? The tux_tpalloc and tux_free are new functions in my module. If I comment out everything but the phpinfo () and hit a fresh

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Andi Gutmans
Your module is probably causing some memory corruption. The best way to debug it is building the module statically into PHP. You need to copy it to ext/your_module/ (assuming you have a standard config.m4). Then in php4/ run ./buildconf and you should see your module when you do ./configure

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Sterling Hughes
On Mon, 30 Apr 2001, Andi Gutmans wrote: Your module is probably causing some memory corruption. The best way to debug it is building the module statically into PHP. You need to copy it to ext/your_module/ (assuming you have a standard config.m4). Then in php4/ run ./buildconf and you should

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Andi Gutmans
Sounds like some kind of memory corruption. With these kind of problems even the order of statements can make a difference. Do you want to post those two functions and we can take a look at them? Also are your RINIT() MINIT() functions doing anything? Maybe they are causing problems? Andi

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-30 Thread Brian Foddy
I'm going to try and build it statically first. I don't have any problem posting the code (its already avail on sourceforge but you will need some proprietary libraries to build it). The MINIT and/or RINIT is the constants are initialized. You've given me some to go on, I'll work with it for a

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-28 Thread Andi Gutmans
At 12:20 AM 4/28/2001 -0500, Brian Foddy wrote: Both were compiled with debug ON. I'll try them off. I'm away for the weekend but will try it Sunday night or Monday. There is a known bug that if you load a shared library with dl(), compiled with debug and it leaks memory that it will crash.

[PHP-DEV] Troubles with DL'ed module

2001-04-27 Thread Brian Foddy
I'm having strange problems with a new DL module I'm trying to write. The most common problem is PHP will coredump after my module has executed in the module cleanup routines (the Zend routines, not my module routines). For instance it will coredump on cleaning up the 10th constant defined by my

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-27 Thread Andi Gutmans
Did you compile with debug on or off? Please try without debug in both PHP and your module and let us know if something changes. Also can you try and load it via php.ini (extension=module.so) and not with dl(). Andi At 01:41 PM 4/27/2001 -0500, Brian Foddy wrote: I'm having strange problems

Re: [PHP-DEV] Troubles with DL'ed module

2001-04-27 Thread Brian Foddy
Both were compiled with debug ON. I'll try them off. I'm away for the weekend but will try it Sunday night or Monday. Thanks, Brian Andi Gutmans wrote: Did you compile with debug on or off? Please try without debug in both PHP and your module and let us know if something changes. Also can