I developed a PHP extension for MacOS X and when loaded from within apache+php everything works fine. The issue occurs every time I try to execute php from the command like for example:

php -r "print ini_get('extension_dir');"

then PHP crashes and I got a dylib error:

dyld: lazy symbol binding failed: Symbol not found: ZEND_ROUTINE_HERE
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20020429/ rsql.dylib
  Expected in: flat namespace

dyld: Symbol not found: ZEND_ROUTINE_HERE
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20020429/ rsql.dylib
  Expected in: flat namespace

please note that ZEND_ROUTINE_HERE is the first routine I use in the dylib entrypoint PHP_MINIT_FUNCTION.

Something is wrong, but I really do not understand how I can solve the issue because as I already said when loaded from within apache everything works fine without any error.

The dylib is generated with the following parameters to gcc:
-dynamic -flat_namespace -bundle -undefined suppress

 I tried also to modify these flags to:
-dynamic -twolevel_namespace -bundle -bundle_loader /usr/bin/php

but nothing changed.

Please help.
---
Thanks a lot,
Marco Bambini
Italy

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to