Re: PHP Mssql Connection Error: Permissions?
"Derrick Betts" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Organization | Blue Axis |
| Message-ID | <050e01cc6d6a$3519b560$9f4d2020$@com> |
Son of a gun, Daniel. That was the problem. I changed that setting and we're getting results. Wow, thanks so much everyone for you help. Derrick -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Daniel Fazekas Sent: Wednesday, September 07, 2011 8:12 AM To: FreeTDS Development Group Subject: Re: [freetds] PHP Mssql Connection Error: Permissions? Are you by chance running on a SELinux-enabled system? It's possible the web server process is forbidden from opening connections to remote servers by default. If so, you could try these to check and read about the various options: /usr/sbin/getsebool -a | grep httpd man httpd_selinux On my system, I have these: httpd_can_network_connect --> off httpd_can_network_connect_db --> off So I'd first try /usr/sbin/setsebool -P httpd_can_network_connect_db 1 And if that wasn't enough, also enable /usr/sbin/setsebool -P httpd_can_network_connect 1 Depending on whether the port your db is listening on is considered a db port by selinux's list. If that wasn't it, you'll have to enable logging. http://www.freetds.org/userguide/logging.htm http://www.freetds.org/userguide/appendmode.htm On Sep 7, 2011, at 15:59, Derrick Betts wrote: > My apologies, I should have included that earlier. It's not very helpful > however, the error from the browser is: > > SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does > not exist (severity 9) > > -----Original Message----- > From: Armando Ortiz [mailto:[email protected]] > Sent: Wednesday, September 07, 2011 7:58 AM > To: [email protected]; FreeTDS Development Group > Subject: RE: [freetds] PHP Mssql Connection Error: Permissions? > > What does your PHP error log show when you run that script from the browser? > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Derrick Betts > Sent: Wednesday, September 07, 2011 6:51 AM > To: 'FreeTDS Development Group' > Subject: Re: [freetds] PHP Mssql Connection Error: Permissions? > > Thank you very much for your input. > I don't think that's the issue because I can run the PHP command as apache > and have the script execute from the command line like so: > > -bash-3.2$ PHP /var/www/html/axis/public/test.php _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds