[freetds] [Fwd: Problems configuring php with freetds]

Michael Soh me at mikesoh.com
Fri Jun 6 15:13:13 EDT 2008


> Check with Ubuntu people then, maybe there's a similar procedure.
> Wikipedia seems to suggest that they also use SELinux now.

Nope.  I checked this.

> The main issue here is not what PHP is calling, it's that PHP runs
> inside your Apache webserver.
> Default security policies now often prohibit the webserver to initiate
> connections to arbitrary third-party addresses and ports. By default,
> it is only allowed to answer incoming requests or use local databases.
> If you need more, you have to enable it yourself.

I understand this; but it doesn't make sense that php is able to use
fsockopen to connect to any other www and download files, and then display
them.

There's also nothing wrong with the server; otherwise tsql wouldn't have
worked.

> Try to run you PHP script from the command line, rather than the web
> environment, and you'll probably see that the database connection is
> allowed there.

I tried this but got the same result.

> If not, then just ignore this thread and look elsewhere; starting with
> enabling FreeTDS logging:
> http://www.freetds.org/userguide/logging.htm

I tried enabling logging per the instructions on the web site.  For some
reason, logging isn't happening.  Could it be that I compiled freetds
and/or php incorrectly?  Is there a way to check?

FWIW, I can access MySQL servers fine.

Thanks for everyone's help with this.




More information about the FreeTDS mailing list