Problems building and using mssql.so php extension, AMPPS server on MAC OSX -
Problems building and using mssql.so php extension, AMPPS server on MAC OSX -
i think need know how specify build architecture when building .php extensions on osx. architectures should seek first, , how specify them?
the details:
i having problem building working mssql.so php extension server.
i have been using ampps server on mac serve php based websites, accessing mysql databases.
now need connect mssql database. ampps php installation not include mssql extension when seek utilize mssql_connect()
next error.
call undefined function `mssql_connect()` in /applications/ampps/www/test.php
i think need add together mssql.so php/lib/extensions/ext folder , add together
extension=mssql.so
to php.ini file.
to build mssql.so have found couple of online tutorials both utilize freetds:
http://lkrms.org/php-with-freetds-on-os-x-mavericks/#comment-82521
http://blog.benjaminwalters.net/?p=10
i used home brew install autoconf:
brew instal autoconf
then downloaded , installed freetds:
./configure --prefix=/usr/local/freetds --sysconfdir=/usr/local/freetds/conf/freetds --disable-libiconv --disable-odbc create sudo create install
freetds installed @ /usr/local/freetds. downloaded php. have tried versions available download 5.6.2, 5.5.18, 5.4.32 , 5.3.29. 5.3.29 had problem , not generate mssql.so.
all of other versions successfuly produced mssql.so using next method:
unzip bundle in downloads folder
cd php-5.4.17/ext/mssql phpize ./configure --with-php-config=/usr/bin/php-config --with-mssql=/usr/local/freetds create
then re-create generated mssql.so /applications/ampps/php-5.4/lib/extensions/ext , add together php.ini file.
extension=mssql.so
i restart apache server , view error / log file has next error:
php warning: php startup: unable 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, wrong architecture in unknown on line 0
so seems have built mssql.so wrong architecture?
i looked @ terminal output when configure "make" mssql.so , found next indicating architecture beingness made for:
checking build scheme type... i386-apple-darwin13.1.0 checking host scheme type... i386-apple-darwin13.1.0 checking target scheme type... i386-apple-darwin13.1.0
so looks made i386. start confused.
after create terminal instructs me run "make test", , receive next output:
===================================================================== php : /usr/bin/php php_sapi : cli php_version : 5.4.24 zend_version: 2.4.0 php_os : darwin - darwin mymac13.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 ini actual : /users/user/downloads/php-5.6.2/ext/mssql/tmp-php.ini more .inis : cwd : /users/user/downloads/php-5.6.2/ext/mssql dirs : valgrind:notused ===================================================================time start 2014-10-26 11:53:50 =====================================================================
no tests run. not why no tests run frustrating. mentions x86_64 not i386.
i tried check architecture scheme verify if should i386 or x86_64.
i did uname , arch follows:
uname -p i368 uname -m x86_64 arch i386
so machine hardware x86_64 (uname -m) processor architecture i386 (uname -p) don't understand how these can different or implications of are.
so have built mssql.so wrong architecture or have done else wrong? if have built wrong architecture how configure build right one?
many help this.
php sql-server osx apache autoconf
Comments
Post a Comment