on ‎2011 Mar 21 2:31 PM
Hello,
I'm been trying to get PHP working with the sqlanywhere.so module and I get the following message. PHP Warning: PHP Startup: Unable to load dynamic library
PHP 5.2.17
Mac: O/S X : 10.6.6
Server version: Apache/2.2.15 (Unix)
Zend Server:
Sybase Version 7.0
In phpInfo(), it shows that my sqlanywhere.so extension is in the proper extension_dir, and the php.ini file shows that the extension is suppost to be loaded.
I've downloaded the latest module threaded version from the sybase website (ver 5.3.5) threaded and still doesn't work. In addition I've also tried to manually compile the extension and paste into my extension_dir, but get the same error.
Also my LD_LIBRARY_PATH is set in my env and does point to the library files, so when i run say ./dbsrv12 it works.
Please help this is very frustrating
Request clarification before answering.
OMG after weeks finally figured it out! PHP is not build in 64 bit, and I was trying to load a 64 bit module to a 32 bit application and of course it won't work. I checked the bit of the extension by using the file command and got this
$ file /usr/local/zend/lib/php_extensions/sqlanywhere.so /usr/local/zend/lib/php_extensions/sqlanywhere.so: Mach-O 64-bit bundle x86_64
Then I used the below way to compile to make 32 bit module instead and ran the file command again and got.
$ file /usr/local/zend/lib/php_extensions/sqlanywhere.so /usr/local/zend/lib/php_extensions/sqlanywhere.so: Mach-O bundle i386
USE The below to complie as 32 bit:
phpize CFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os' LDFLAGS='-O3 -arch i386 -arch x86_64' CXXFLAGS='-O3 -fno-common -arch i386 -arch x86_64 -g -Os'
./configure --disable-dependancy-tracking --disable-shared -enable-static
I was stumped, but now I see....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.