note 85675 added to function.odbc-connect
| From: | Anonymous at osu1 dot php dot net | Date: | Thu, 11 Sep 2008 20:16:29 +0000 |
| Subject: | note 85675 added to function.odbc-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144344@lists.php.net to get a copy of this message | ||
This might be obvious to some, but here is a quick tidbit that might save you some time if
you're using FreeTDS in Linux:
Be sure that you have these two lines in freetds.conf:
dump file = /tmp/freetds.log
dump file append = yes
so you can tail -f it in the background of debugging the problem. This helped me find my issue on
on CentOS Linux:
1) tsql test works
2) isql test works
3) odbc connection in php also works WHEN RUN FROM THE SHELL
4) running PHP through apache does NOT work.
my /tmp/freetds.log file told me:
net.c:168:Connecting to MYDBSERVER port MYDBPORT
net.c:237:tds_open_socket: MYDBSERVER:MYDBPORT: Permission denied
and the answer was my firewall/SELinux was denying the Apache processes access to connect to the
remote MSSQL DB port, but my shell accounts were fine.
----
Server IP: 209.41.74.194
Probable Submitter: 66.63.145.114
----
Manual Page -- http://www.php.net/manual/en/function.odbc-connect.php
Edit -- https://master.php.net/note/edit/85675
Del: integrated -- https://master.php.net/note/delete/85675/integrated
Del: useless -- https://master.php.net/note/delete/85675/useless
Del: bad code -- https://master.php.net/note/delete/85675/bad+code
Del: spam -- https://master.php.net/note/delete/85675/spam
Del: non-english -- https://master.php.net/note/delete/85675/non-english
Del: in docs -- https://master.php.net/note/delete/85675/in+docs
Del: other reasons-- https://master.php.net/note/delete/85675
Reject -- https://master.php.net/note/reject/85675
Search -- https://master.php.net/manage/user-notes.php