[unixODBC-support] PHP doesn't detect unixODBC

Martin Evans martin.evans at easysoft.com
Thu Jan 18 09:14:49 GMT 2007


Drewfus wrote:
> Hello,
> 
> I have loaded unixODBC with a ODBC driver as well - everything works 
> fine via iSQL, so I have proceeded to rebuild apache & PHP so that I can 
> connect via my web application.  When I go to configure PHP, I'm using:
> 
> ./configure --with-unixodbc=/usr/local/easysoft/unixODBC \
> --with-png-dir=/usr/local/lib \
> --with-zlib-dir=/usr/local/lib \
> --with-gd --with-apache=../apache_1.3.27 \
> --disable-shared --with-jpeg-dir=/usr/local/lib \

Why have you put --disable-shared?

Doesn't php 4.3.4 have the --with-apxs2 to point it at apache?


> --without-mysql
> 
> This goes off without a hitch - I go forward with my make, make install 
> and finishing the apache build.  I then load up my phpinfo() test page 
> and see:
> 
> Configure Command
> './configure' '--with-png-dir=/usr/local/lib' 
> '--with-zlib-dir=/usr/local/lib' '--with-gd' 
> '--with-apache=../apache_1.3.27' '--disable-shared' 
> '--with-jpeg-dir=/usr/local/lib' '--without-mysql' 
> '--with-oracle=/u01/OraHome1' '--with-oci8=/u01/OraHome1'
> 
> And obviously when I try the ODBC Commands in PHP, they are showing up 
> as undefined as well.  This is PHP Version 4.3.4 (A bit old) - but I can 
> only assume that the reason I'm getting "Call to undefined function: 
> odbc_connect()" is because the 'with-unixodbc' is being dropped for some 
> reason during my configure. 
> 
> I also noticed that while the configure is running, I see the following 
> line:
> 
> checking for unixODBC support... no
> 
> The directory I'm specifying with the configure command is correct - am 
> I missing a step; perhaps needing to add the unixODBC Lib Path to one of 
> my paths before executing the configure?
> 
> Any guidance is appreciated,
> -Andrew

Try the following:
http://www.easysoft.com/developer/languages/php/apache_odbc.html

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com



More information about the unixODBC-support mailing list