MSSQL with PHP on IIS6

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

MSSQL with PHP on IIS6

Post by nawhaley »

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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Sounds like extensions or other DLL's needed couldn't be located or weren't loaded to begin with. Open up your php.ini, change error_reporting to E_ALL (at minimum), display_errors to On, and maybe even set the error_log entry to a full path (with file name)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Which version of MySQL are you trying to connect to? Did you enable your mysql or mysqli extensions?
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

Post by nawhaley »

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.
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

Post by nawhaley »

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.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Sorry, I must have completely overlooked your post title (I'm losing it I think).

What db functions are you using?
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

Post by nawhaley »

odbc functions I.E. odbc_connect() and the like. Like I stated it worked previously just after reinstalling the server some small component is missing keeping it from working now.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Cool, now I am back in the same timing as the rest of this thread :x Is your set up exactly the same as it was prior to the reinstallation? Also, can you access your SQL Server with Enterprise Manager (or other DB utility)?
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

Post by nawhaley »

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 >_>.
nawhaley
Forum Commoner
Posts: 85
Joined: Wed May 18, 2005 11:43 am

Post by nawhaley »

I"m going to bump this because I'm still scouring for an answer and I cant seem to find anything surely I"m not the "only" person to ever run into this does anyone have any ideas?
Post Reply