Need help with PHP setup (IIS/MSSQL/PHP)

v6maro

[H]ard|Gawd
Joined
Oct 10, 2002
Messages
1,552
I've always used PHP on an Apache/MySQL/PHP setup via EasyPHP (single install setup)

I now find myself needing to do an IIS/MSSQL/PHP setup and I am lost, lol.

When I try to call mssql_connect(...) i get the following back

Fatal error: Call to undefined function mssql_connect() in F:\Program Files\EasyPHP 2.0b1\www\selfService\include\db.inc on line 7

Sooo this tells me my php.ini is off, right?

I added the line: ;extension=php_mssql.dll

restarted, and same error. What am I doing wrong?

I installed easy php and I am just trying to connect to a mssql db instead of a mysql

thanks.
 
The ";" prefix to the line is a comment. So when it reads php.ini, it won't load teh extension. You need to have this as the line:

extension=php_mssql.dll

That will properly load the extension when IIS / PHP is restarted. One thing I have noticed is that when using mySQL and Apache, PHP doesn't like to find all the extensions or use mySQL unless the PHP path is in the PATH environment variable. So if you can't connect to mySQL, or you can't see your mySQL config in your phpinfo() page, then try adding the path to PHP to your Windows Environment Path variable (Right Click "My Computer" --> Properties --> Advanced tab --> [Environment Variables] button)
 
one other VERY important step. in order for it to work, PHP also needs some .dlls from MSSQL. Get your MSSQL setup disk and run the installation on the webserver, but choose only the client installation, this will install all the necessary files for you.
 
yeah, I noticed that on the php.net function references.

I got it all working now, lol, damn semicolon!
 
Back
Top