extension not loading with php 5

From: Date: Wed, 20 Jul 2005 15:10:21 +0000
Subject: extension not loading with php 5
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2633@lists.php.net to get a copy of this message
I have an extension that is written in C and C++ that works with PHP 4, on Fedora and Redhat (several different versions) and on x86_64. I recompiled it on Fedora Core 4 with PHP 5 on an x86_64. I recompiled all portions of the extension, and I did phpize - aclocal - ./configure step first. ( I did have to edit the /usr/include/php/main/php_config.h file to comment out the line that says "#define HAVE_GD_BUNDLED 1"; I think that is a problem with the Fedora Core 4 rpms, and I don't think it is related to my problem. ) Anyway, the problem is that when I dl(my_extension.so) it does not load up correctly. If I print the return value of dl, it is empty ( I think it is supposed to return an int, but it prints as nothing, not 0 ). When I run the get_extension_funcs() function, it doesn't return any of the functions in my extension. When I have had these symptoms in the past (in PHP 4.3.11), it was usually because a needed library could not be found -- running "ldd my_extension.so" would show an unfound library, and the problem was usually that I had not run "ldconfig" after installing something from source. That's not the problem this time, ldd shows the same output as with PHP 4. I also ran code from the comamnd line through gdb and strace but saw nothing peculiar there. Because of the stuff I did related to the gdlib, I temporarily changed the php.ini not to load gd.so, and moved it out of the extensions directory -- that didn't fix it. Any thoughts or suggestions would be appreciated, I'm kind of stuck. Even the simplest things to check would be appreciated. --Rob P.S. Note this is not the same problem as the extension crash I asked about previously on this list (a couple of weeks ago). That was related to my move to 64 bit, and the problem was I was returning a int through RETURN_LONG() from my extension. -- Robert G. Ristroph Airlink Systems rristroph@airlinksystems.com (512) 231-1240 x103 ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

« previous php.pecl.dev (#2633) next »