Setup: Static/CGI/PHP-5.4 I'm building an application that has a connection to a MSSQL database - I'm setting up the connection with:
"dblib" being the PDO driver. However, my current setup only has these drivers installed: mysql, pgsql, sqlite, sqlite2. After looking online, I narrowed it down that I have to install the "PDO_DBLIB" Package (Found here: http://pecl.php.net/package/PDO_DBLIB). I began following these instructions on how to install: http://atutility.com/2007/09/14/install-pdo-pdo_sqlite-pdo_dblib-pdo_mysql. After the build command was entered, it printed this with an error at the last line:
So now my new task is getting FreeTDS installed. I got the .tgz file from its website, unpackaged it, put the folder on my server, cd'd to the folder and ran:
This command fine. Based on the Installation instructions within the folder, the next step was to run "make". I entered this and it returned this error:
and that's where I'm stuck. I've been looking everywhere on how to resolve this but haven't found anything helpful. So my questions are either: How can I fix this FreeTDS installation error? OR What's an alternative way I can get the dblib driver installed? I would greatly appreciate any answers, guesses, tips, etc. Thanks much! asked 28 Apr '12, 12:50 3vets |
Hi, FreeTDS is already installed on all our servers. Can you use the command: rpm -qa|grep freetds on your server? Also, you have to use the commands:
instead of pecl build. If PECL module still does not compile, you can install:
locally and use that.
The above RPM contains Thanks for your response! I ran:
and it returned:
So I ran phpize54 and then entered:
But it returned the same error as before:
...confused, I guess its not recognizing where the FreeTDS is installed. Do you have any other suggestions on how this can be done? Thanks for the info about hosting it locally but I'd rather get this configured on the server.
(29 Apr '12, 16:55)
3vets
You can build FreeTDS from source code, this is better since you will have the most recent version. The process is covered in a community post which covers a similar process for python. You can than typically find the way to specify the path for the library by running configure --help,
Someplace in the output the author should have placed a flag for specifying the FreeTLD path.
(29 Apr '12, 17:57)
johns
Thanks for that link. I was able to follow the process and get FreeTDS installed. But when I go back to install the PDO_DBLIB package, it still spits the same error:
I looked in the Help options but wasn't sure which command should be used to specify the path. Any idea? Thanks!
(04 May '12, 18:44)
3vets
Did you try installing using RPM as stated above yet? I just did one on test server locally and was able to get it working.
(04 May '12, 20:06)
neeravk
Yeah, thanks for the tips above, I tried installing the RPM in your previous reply but it returned: "Couldn't resolve host 'php-mssql-5.4.1-1.el5.remi.i386.rpm'" The tmp directory IS writable - I found that unwritable permissions may be an issue with that error. Thoughts?
(06 May '12, 22:26)
3vets
It is trying to use the rpm filename as a host which is odd. Are you sure you used the command: wget http://rpms.famillecollet.com/enterprise/5/test/i386/php-mssql-5.4.1-1.el5.remi.i386.rpm worked properly?
(06 May '12, 22:30)
neeravk
showing 5 of 6
show 1 more comments
|
I was able to resolve the issue by using the following commands:
replacing <my-app> with the application name. answered 10 May '12, 12:55 3vets |