Page 1 of 1

MSSQL Setup Question

Posted: Sun Feb 01, 2004 7:55 pm
by Dowfen
Hello,

I installed PHP via the Windows Installer on a Windows 2003 server running IIS 6.0. The PHP works (I tested with a print statement) but the MSSQL stuff doesn't. This is SQL Server 2000.

What I've done:

1) Installed MSSQL and Client Tools
2) Added the mssql extension to the php.ini file.
3) Extracted the large zip file to the C:\PHP directory.
4) Moved the DLLS in the dll folder to the system32 folder.

Whenever I try to run a mssql_connect function I get this error:

Fatal error: Call to undefined function: mssql_connect() in C:\Inetpub\Website\sqltest.php on line 8

I've tried everything I can find on the forums, I'm not sure what I'm doing wrong. I'd really like to use SQL Server 2000 because I need to test it for Microsoft Small Business Server 2003, so going to MySQL is a last resort.

I greatly appreciate any help and information,

Eric

Posted: Mon Feb 02, 2004 2:41 am
by twigletmac
Could we see the bit of the php.ini where you added the mssql extension?

Mac

Posted: Mon Feb 02, 2004 1:15 pm
by Dowfen
Thanks for the reply. I did get it to recognize the function call, but now no matter what I do I can't get it to connect to the SQL server.

I've tried "localhost", "localhost:1433", "localhost,1433", "servername", "servername:1433", "servername,1443", "ip address", "ip address:1433", "ip address,1433", "FQDN", etc. etc.

The SQL server is running. The error that PHP returns is that it "can not connect". It's not returning an invalid user name/password. I'd be happy if it was doing that. <grin>

I'm fairly certain the SQL server is running as I can log into it via Query Analyzer (I think that's what it is called).

Again, I appreciate any help and information. I hope it's just something stupid I'm doing.

Thanks in advance for any help,

Eric

Posted: Mon Feb 02, 2004 11:46 pm
by Dowfen
I've tried a few other things and still have not been able to get it to work.

I thought I'd just say exactly what I did and post the php.ini file and maybe that will shed some light on whatever I did/didn't do that is causing it to not work.

1) Installed PHP via the windows installer.
2) Got the PHP working inside IIS.
3) Downloaded .zip package and unzipped it to C:\PHP folder.
4) Moved all the dlls in the dlls folder to the system32 folder.
5) Uncommented the MSSQL extension.
6) PHP says it cannot connect to the SQL server.
7) Uncommented a few more extensions and added the path to the extensions in the PHP.ini file.

Here's the http://www.watercascades.com/eric/php.txt to the php.ini file.

I really appreciate any help.

Eric

Posted: Tue Feb 03, 2004 11:37 am
by malcolmboston
localhost:1443?
sure its not localhost:80?

Posted: Tue Feb 03, 2004 1:33 pm
by Dowfen
Based on someone's suggestion I read in another thread I looked in one of the client tools and it said 1433. I think that is default, but again I'm not 100% sure.

Eric