Posted By: DPets on October 27, 2014, 10:57 am | Post: 1 |
I think I had better add some details. To build a mssql.so file I followed instructions at this link:http://lkrms.org/php-with-freetds-on-os-x-mavericks/#comment-82521 Basic process using Freetds is ownload php from php.net unzip (downloads folder) cd php-5.4.17/ext/mssql
phpize ./configure --with-php-config=/usr/bin/php-config --with-mssql=/usr/local/freetds make After configure I see some lines indicating the architecture I am building for:checking build system type... i386-apple-darwin13.1.0 checking host system type... i386-apple-darwin13.1.0 checking target system type... i386-apple-darwin13.1.0 I get mssql.so in mssql/modules folder after "make" I move it to " /Applications/AMPPS/php-5.4/lib/extensions/ext" add "extensions=mssql.so" to php.ini file. Restart apache. Then check the error logs and I get this error HP Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.4/lib/extensions/ext/mssql.so' - dlopen(/Applications/AMPPS/php-5.4/lib/extensions/ext/mssql.so, 9): no suitable image found. Did find:\n\t/Applications/AMPPS/php-5.4/lib/extensions/ext/mssql.so: mach-o, but wrong architecture in Unknown on line 0So I think I built it for the wrong architecture, but I don't know for sure and I don't know how to build it for a different achitecture.I checked my machine architecture using the following, but I got mixed results:uname -p i368 uname -m x86_64 arch i386 I checked php binary architecture using the following:cd /Applications/AMPPS/php-5.5/bin Then file php The output is "php: Mach-O executable i386" phpinfo() gives "System" as Darwin myMac 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64 Does this mean x86_64 binary Any help in figuring out how to get a working mssql.so would be greatly appreciated. |