Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP in IIS7 issue

Status
Not open for further replies.

dkemas

Programmer
Mar 22, 2012
70
GB
Firstly let me apologise if this is the wrong forum, I couldn't find a specific forum for IIS and php.

The IT team in their wisdom are decomissioning the apache machines and only supporting windows, they have created a virtual Windows Server 2008 R2 system with IIS7.

I managed to set up php manually (not allowed to use wamp) and have a working phpinfo page.

The problem is around my database connection scripts (connecting to a SQL server on another machine).

I am getting "PHP Fatal error: Call to undefined function mssql_connect()" which indicates that the extension isn't installed - but it is.

In php.ini I have

extension=php_sqlsrv_53_nts_vc9.dll
extension=php_pdo_sqlsrv_53_nts_vc9.dll

and the dll's are located in the ext folder.

The dll's are correct for my version according to the official Microsoft website and the phpinfo page shows

sqlsrv
sqlsrv support - enabled
sqlsrv.LogSeverity 0 0
sqlsrv.LogSubsystems 0 0
sqlsrv.WarningsReturnAsErrors On On

I created a simple test page using sqlsrv_connect(), sqlsrv_query() etc and it works fine, it connects to the database and prints the results.

Over all of the applications / websites I have created over the last few years I have always used mssql_connect, mssql_query, mssql_num_rows etc so have thouands of these references and with some of the differences (i.e. sqlsrv_num_rows needs params and options specifying) it will take an age to go through and change everything.

Does anyone know how to get mssql_connect etc running on the server?

Thanks
 
And forum41 is for IIS

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top