Configuration of pdo_odbc require files in /usr/local/ but there are no files
Asked Answered
S

1

5

I'm trying to setup pdo_odbc on my online server. I use putty, and I have some basic knowledge in Linux commands.

At a start, on my online server, I did not have PDO installed. I found the way to install it, and it works. Then I have to install pdo_odbc, but I got lost. installing pdo_mysql was very easy and there was no problem. With pdo_mysql I made a connection to some mysql database.

But for pdo_odbc, I got stuck. A have located myself into folder with pdo_odbc instalation files, I have run phpize, and then I run command

./configure --with-pdo-odbc=unixODBC

And then it tells me that I need a list of 18 files to be included into folder /usr/local/include/ but there are no files in that folder.

My question is how I can find (if I can find) a location where these files are located, or what I need to do to have these files on my server.

This is what I get:

checking for odbc.h in /usr/local/include... no 
checking for odbcsdk.h in /usr/local/include... no 
checking for iodbc.h in /usr/local/include... no 
checking for sqlunix.h in /usr/local/include... no 
checking for sqltypes.h in /usr/local/include... no 
checking for sqlucode.h in /usr/local/include... no 
checking for sql.h in /usr/local/include... no 
checking for isql.h in /usr/local/include... no 
checking for sqlext.h in /usr/local/include... no 
checking for isqlext.h in /usr/local/include... no 
checking for udbcext.h in /usr/local/include... no 
checking for sqlcli1.h in /usr/local/include... no 
checking for LibraryManager.h in /usr/local/include... no 
checking for cli0core.h in /usr/local/include... no 
checking for cli0ext.h in /usr/local/include... no 
checking for cli0cli.h in /usr/local/include... no 
checking for cli0defs.h in /usr/local/include... no 
checking for cli0env.h in usr/local/include... no configure: error: Cannot find header file(s) for pdo_odbc

On my computer, I have installed WAMP, and it comes with PDO and pdo_odbc, and I have made PDO to work with external database with pdo_odbc driver, but on my online server, I can not find solution online.

Thanks

Shredding answered 14/10, 2014 at 23:56 Comment(3)
Looks like you're missing some dependencies or they are installed in a different location. Read installation instructions carefully to see what's required.Quesenberry
@ Aleks G Problem is that I have read many resources, but they never mentioned what if there is a problem, of anykind like PHP link Also, I do know know where to start looking on my server to find these files... I'm going on foot on my server seraching each folder (step of desperate man)Shredding
On a linux/unix server, you can use locate command to find a specific file. For example, locate sql.h will search for it everywhere on the system and tell you where it is if it exists. However in your case I suspect that you require a dependency that doesn't exist on your server. Read the installation guide for pdo_odbc, identify the prerequisites/dependencies and install those first.Quesenberry
S
9

You can try installing unixODBC and unixODBC-devel (if not installed yet) and run configure with options:

./configure --with-pdo-odbc=unixODBC,/usr/

For me it was the goal I was looking for

Stylolite answered 23/4, 2015 at 8:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.