MSSQL with PHP on IIS6
Moderator: General Moderators
MSSQL with PHP on IIS6
I got PHP installed and configured on my webserver using the PHP5ISAPI.dll and ran a test page which seemed to run fine. The issue is when I start to run anything that does an SQL query it won't pull anything from the database. I also cant find a way to get error messages out of IIS leaving me with no way to debug it at all which is very frustrating. I have the system DSN file setup properly since testing it works,PHP also works since my test page pulling phpinfo() works as well.
All that comes up on my page that pulls data from the database is the initial text and once it reaches the query nothing else. This has me dumbfounded since I setup the whole thing on my local machine to test on apache then converted it over to work with IIS that worked fine before the web server crashed and I had to reinstall now nothing. Anyone have any ideas or at least a way to get error messages out of IIS6 so I can troubleshoot more effectively?
All that comes up on my page that pulls data from the database is the initial text and once it reaches the query nothing else. This has me dumbfounded since I setup the whole thing on my local machine to test on apache then converted it over to work with IIS that worked fine before the web server crashed and I had to reinstall now nothing. Anyone have any ideas or at least a way to get error messages out of IIS6 so I can troubleshoot more effectively?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
not using MySQL I'm using MS SQL server 2000. I'll work on setting up the error reporting and see what comes up on the screen. It almost looks like its just timing the query out when its running rather than failing since commonly when it fails I get a "fetch row invalid" message from my own error checking but thats not happening on this its just blank.
Interestingly enough it looks like its denying access to the database for some reason between the two. Keep in mind my SQL server is not on the same box as the PHP app I"m running which is on my webserver. Here is the error message I am getting.
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied., SQL state 08001 in SQLConnect in D:\InetPub\wwwroot\test\appllivewritequestion.php on line 13
oddly this is happening with the System DSN configured properly I.E. its the same one I configured on my own PC for testing.
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied., SQL state 08001 in SQLConnect in D:\InetPub\wwwroot\test\appllivewritequestion.php on line 13
oddly this is happening with the System DSN configured properly I.E. its the same one I configured on my own PC for testing.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
As far as I can tell the setups the same yes and yes I can access the database from the enterprise manager on the local server. Also my desk PC can access the database with the apache server setup I configured for testing its just the copy of the program configured for the IIS server that dosent seem to want to work properly. There has to be something different with the server configuration but I just can't put my finger on it as to what it could be.
P.S. Sorry for the overnight delay I went home and tried to forget about this stuff for a while >_>.
P.S. Sorry for the overnight delay I went home and tried to forget about this stuff for a while >_>.