Skip to Content.
Sympa Menu

freetds - Re: [freetds] freetds with odbc not working with php5

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT t-online.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] freetds with odbc not working with php5
  • Date: Wed, 6 Jun 2007 22:00:59 +0200


On Jun 6, 2007, at 18:33, Riley Griffin wrote:

I am running Centos5.
net.c:168:Connecting to (Server IP) port 1433.
net.c:237:tds_open_socket: (Server IP):1433: Permission denied
util.c:119:Changing query state from IDLE to DEAD
token.c:2252:tds_client_msg: #20009: "Server is unavailable or does not exist.".

Sounds like a SELinux issue.

Try:
man httpd_selinux

getsebool -a | grep httpd

Either
setsebool -P httpd_can_network_connect_db 1
or
setsebool -P httpd_can_network_connect 1

should do it. I think "httpd_can_network_connect_db" is more restrictive, if it allows port 1433 and your script can then connect, then that's all you needed.

Please help me, I am new to FreeTDS but I have been looking all over the place for a solution to this problem with very little luck.

Doesn't look like a FreeTDS or even a PHP problem, so you were likely looking in the wrong place.

Check the dmesg command's output or wherever your SELinux denials are logged (/var/log/messages?).

--
fds




Archive powered by MHonArc 2.6.24.

Top of Page