Jump to content

Installing unixODBC support from source


Recommended Posts

I just tried to make PHP with unixODBC support and I got a fatal error:

 

/bin/sh /tmp/php-5.3.13/libtool... -o ext/odbc/php_odbc.lo
In file included from /tmp/php-5.3.13/ext/odbc/php_odbc.c:37:
/tmp/php-5.3.13/ext/odbc/php_odbc_includes.h:118:17: sql.h: No such file or directory
/tmp/php-5.3.13/ext/odbc/php_odbc_includes.h:119:20: sqlext.h: No such file or directory
In file included from /tmp/php-5.3.13/ext/odbc/php_odbc.c:37:
<snip>
*** Error code 1
make: Fatal error: Command failed for target `ext/odbc/php_odbc.lo'

 

Here's part of my configure command:

 

./configure --prefix=/export/appl/pkgs/php/v5.3.13 \
  --with-apxs2=/export/appl/pkgs/httpd/latest/bin/apxs \
  ...
  --with-unixODBC=shared,/export/appl/pkgs/unixodbc/latest \
  ...

 

I'm pretty sure the rest of my configure command is valid since it was working prior to trying to install unixODBC.  And I already installed unixODBC before I attempted this.

 

Google returns alot of chaff.  Can anyone clue me in?  Much appreciated...

 

- Joe

Link to comment
https://forums.phpfreaks.com/topic/262872-installing-unixodbc-support-from-source/
Share on other sites

The shared keyword is there so when everything is compiled, the feature will be externalized as a PHP module that can be referenced from PHP.INI rather than part of a monolithic binary.  I have to separate the keyword from the location of the referenced library directory.

 

As far as the library is concerned, I downloaded and compiled it last week myself.

In the error msg the PHP configure script said it couldn't find sql.h and sqlext.h.  It turns out those files were located in the unixODBC source code.  I copied those two files over to the unixODBC includes directory and PHP compiled without any problems.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.