mssql not loaded

newphpcoder
10:11:10
Good day!

I try a lot of configuration to work my connection from php to mssql but still I cannot connect. And I got a code to check if the mssql was loaded.

Here is the code:

<?php
if (function_exists('mssql_connect')){
echo "Okay, fn is there<br>------------------<br>";
} else {
echo "Hmmm .. fn is not even there<br>------------------<br>";
}

if(extension_loaded("mssql")) {
echo "MSSQL is Loaded<br>";
}
else {
echo "MSSQL not loaded<br>";
}

if(extension_loaded("msql")) {
echo "MSQL is Loaded<br>";
}
else {
echo "MSQL not loaded<br>";
}
echo '<br><br>';

$ext = get_loaded_extensions();
if(in_array('mssql', $ext))
echo 'u have mssql installed<br><br>';
else
echo 'u do NOT have mssql installed<br><br>';

phpinfo();
?>


And when I run this code the result is:

Hmmm….fn is not even there
----------------------
MSSQL not loaded
MSQL not loaded
You do NOT have mssql installed
And the list of phpinfo() appear.

Actually I run this code when my php version is php 5.2.4 and now I try it to php 5.1.4 and the result is still the same.

Web server is IIS 6.0
OS is Windows Server 2003 R2 Standard Edition
PHP version is php 5.1.4
MS SQL Server 2005 Express Edition –Windows Authentication.

I need to solved this problem because my connection in mssql is not working because call to undefined the function mssql_connect().

I hope somebody can help me. Almost three weeks I configure this connection and still I cannot connect.

Any help is highly appreciated.
Thank you.



smo1234
10-11-2010
Return to your PHP installation again. There is an option ( I think repair or configure ) , in the second step ( not sure which step it is ) you will get option to install or remove some components. In that expand the MSSQL connection and ensure that you check the relevant options.

Once it is over check your MSSQL connection by phpinfo() like this.

Should work then
smo1234
10-11-2010
If you have problem then I will post some screen shots of these steps.
newphpcoder
10-11-2010
Actually I'm not installing the php. I configure it using IIS
smo1234
10-11-2010
You need to configure IIS to execute PHP engine but PHP installation needs required dll to connect or configure these functions. So PHP has to be configured as per requirements. By default PHP installs some minimum functions and based on requirements you can add or remove these components.

For example , in future you may need to connect PHP to Oracle database, then you need to add or install the component required by PHP to connect to Oracle database. At this point you have nothing to do with IIS.
newphpcoder
10-11-2010
Yes,I already configured my IIS to work the php.My promblem is the extension of php not loaded.I don't know why
smo1234
10-12-2010
Repair or install PHP with MSSQL support. Nothing to do with IIS side
newphpcoder
10-12-2010
I resolved my problem by moving php.ini form C:\php to C:\WINDOWS
Please Login to post your reply or start a new topic