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 <your_object_file> <your_c_file>

Linking cc -shared -L/usr/local/lib -rdynamic -o <your_module_file> <your_object_file(s)>


Now, when I try to load my extension using dl(), I get the following error:


dl(): Invalid library (maybe not a PHP library) 'my_ext.so'

When, I do "nm" on the library file, I can see the method "zif_confirm_my_ext_compiled" along with other methods. So, it looks like a valid library.

Do I need to add something to the php.ini file? Well, I tried adding

  extension_dir=/usr/local/apache/htdocs
  extension=my_ext.so

That did NOT help either.

Could someone please advise on why PHP 4.3.3 is complaining that it is not a valid PHP extension. Did I miss anything?
Thank you in advance.
--
Anas Mughal
Email: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to