Hello everyone,
When I enable MSSQL with PHP my webservice (iis) stops working, wont serve any files .html, .asp anything.
I did the following
Copied ntwdblib.dll into c:\windows, c:\windows\system32, and c:\php
Copied php_mssql.dll from c:\php\ext, to c:\windows, and c:\windows\system32
removed ; from php.ini for line extension=php_mssql.dll
restarted IIS, and BOOM! nothing works, when I add the ; to extension=php_mssql.dll again and restart it works again...
Can't find any posts of people having the same problem, im using php-cgi.exe to read my php files.
Please help!
Thank you,
curiousTek
mssql problems, iis not working
Moderator: General Moderators
-
curiousTek
- Forum Newbie
- Posts: 5
- Joined: Fri Feb 04, 2005 11:44 am
-
curiousTek
- Forum Newbie
- Posts: 5
- Joined: Fri Feb 04, 2005 11:44 am
No I havent tried running in ISAPI, which dll do I use for that?
I checked my evenlog only thing I could find was this:
IIS started up fine, didnt get a error till I tried to view a page on the site. Received the error: Service Unavailable
I checked my evenlog only thing I could find was this:
Code: Select all
Application popup: Warning : PHP Startup: Unable to load dynamic library 'C:\php5\php_mssql.dll' - The specified module could not be found.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.-
curiousTek
- Forum Newbie
- Posts: 5
- Joined: Fri Feb 04, 2005 11:44 am
-
curiousTek
- Forum Newbie
- Posts: 5
- Joined: Fri Feb 04, 2005 11:44 am
ok, now iis and php seem to be work, all scripts but this one are working. This is returning
No input file specified.
No input file specified.
Code: Select all
<?php
$myServer = "localhost";
$myUser = "sa";
$myPass = "pass";
$myDB = "visits";
$s = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$d = @mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");
$query = "INSERT INTO hits (ip, uagent, referer_page, visited_page)";
$query .= "VALUES ($REMOTE_ADDR, $HTTP_USER_AGENT, $HTTP_REFERER, $PHP_SELF)";
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";
while($row = mssql_fetch_array($result))
{
echo "<li>" . $rowї"Hit_IP"] . "</li>";
}
?>