Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.