Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-06 Thread Anas Mughal
I figured it out! I was loading the wrong file (slap-on-the-forehead). Sorry about my last email. Curt, thank you for helping me out. Now, my first dummy extension is working :)) Anas Mughal wrote: Okay, solved that as well. SED environment variable was not defined! How come I had to define

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-06 Thread Anas Mughal
Okay, solved that as well. SED environment variable was not defined! How come I had to define it myself?! Shouldn't the build process take care of that? Anyway, now when I try to load the extension my_ext.la in my PHP as follows: if(!extension_loaded('my_ext')) { dl('my_ext.la'); } I get

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-05 Thread Anas Mughal
I found one problem. I had to add "=shared" after --enable-my_ext. So, this is what I did: ./configure --enable-my_ext=shared Now, the makefile looks much better. (I have attached the Makefile.) However, I get errors in make. Those errors are generated when invoking the libtool command. [EMAIL

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-04 Thread Anas Mughal
I did "phpize --clean" and run the commands again. My module shows up in "./configure -- help". Also, confirmed that I have the correct versions of those programs. (I also did everything as root just to make sure there isn't any premissions problem. Still no luck!) Please help... Curt Zir

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-04 Thread Curt Zirzow
* Thus wrote Anas Mughal ([EMAIL PROTECTED]): > Yes, I had uncommented those lines already. This how they look in my > config.m4 file: > > PHP_ARG_ENABLE(my_ext, whether to enable my_ext support, > dnl Make sure that the comment is aligned: > [ --enable-my_ext Enable my_ext support]) >

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-04 Thread Anas Mughal
Yes, I had uncommented those lines already. This how they look in my config.m4 file: PHP_ARG_ENABLE(my_ext, whether to enable my_ext support, dnl Make sure that the comment is aligned: [ --enable-my_ext Enable my_ext support]) Now, I ran the commands that you suggested (phpize, confi

Re: [PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-04 Thread Curt Zirzow
* Thus wrote Anas Mughal ([EMAIL PROTECTED]): > I have followed the instructions in the PHP documentation on how to > build a custom dynamic extension. After running ext_skel, I did NOT add > any custom methods. I built the extension using the followind commands: > > Compiling cc -fpic -DCOMPILE

[PHP] dl(): Invalid library (maybe not a PHP library)

2003-12-04 Thread Anas Mughal
I have followed the instructions in the PHP documentation on how to build a custom dynamic extension. After running ext_skel, I did NOT add any custom methods. I built the extension using the followind commands: Compiling cc -fpic -DCOMPILE_DL=1 -I/usr/local/include -I. -I.. -I../Zend -c -o