Re: PHP Mssql Connection Error: Permissions?

"Thomas, Christopher (LLU)" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <6B9B0CEF7F409D439E78288D8665BD8FBAFF5E@oakmont.llu.ad.lluahsc.org>
When you say the script fails, what do you mean by that? Do you get any error msgs? If so what are they? 
 
Chris 

________________________________

From: [email protected] on behalf of Derrick Betts
Sent: Tue 9/6/2011 4:49 PM
To: [email protected]
Subject: [freetds] PHP Mssql Connection Error: Permissions?



I have a PHP script that makes a connection to SQL Server.

>From the command line as root: tsql -H hostname -U username connects just
great and I can run queries.



I have a PHP script in /var/www/html/axis/public/test.php

When I: sudo -u apache -s (change the user from root to apache) and then run
my PHP script from the command line, it connects just great.

But, from the web browser, it fails. The web browser is able to connect
everywhere it is supposed to and renders all the web pages that don't need
an SQL connection.



apache is the user that is running httpd. I've confirmed this via: ps aux |
grep apache



Any ideas as to why apache can run the PHP script and connect just fine from
the command line, but when the browser attempts to connect to the very same
script, it fails?



Thanks,

Derrick

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
winmail.dat (application/ms-tnef, 4.8 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.