I wrote a PHP extension, and I'm trying to get it running on Mac's Apache server.
It runs fine via the command line, for example:
$ php -r 'dl("mylib.dylib");
I also tried building Apache from source, and it works perfectly when I run that (I set it up to use the same PHP as Mac's built-in Apache, too, so no difference there).
However, when I load my extension with the default Apache you get using System Preferences->Web Sharing or, equivalently, apachectl in sbin, it says:
Warning: dl() [function.dl]: Unable to load dynamic library '/usr/lib/php/extensions/mylib.dylib' - (null) in /Users/myuname/Sites/test.php on line 6
Is there something weird about Mac's Apache or some permission for it that I have to set?