Using SQL Server 7 with PHP 4.3.7 Windows 2000 IIS CGI
| From: | outofarea | Date: | Wed, 14 Jul 2004 18:19:02 +0000 |
| Subject: | Using SQL Server 7 with PHP 4.3.7 Windows 2000 IIS CGI | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-13875@lists.php.net to get a copy of this message | ||
Why do I get unable to load dynamic library? The file exists, as is proved
by the code I wrote. Are step by step instructions available to setup PHP to
use SQL Server?
Response I get is:
Let's see if we can load this extension: mssql
First check for file: G:\php437\ext\php_mssql.dll
File Exists!
Warning: dl(): Unable to load dynamic library
'G:\php437\ext\php_mssql.dll' - The specified module could not be found. in
G:\ASP\php_check_sql.php on line 16
did it load it? (php_mssql.dll)
The code being run is:
<?php
$ext = 'mssql';
$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
echo '<br />Let\'s see if we can load this extension: ' . $ext;
$dir = "G:\\php437\\ext\\";
$fn = $prefix . $ext . ".dll";
echo "<br />First check for file: " . $dir . $fn;
//$handle = fopen($dir . $fn, "r");
$handle = file_exists($dir . $fn);
if ($handle)
echo "<br />File Exists!";
else
echo "STUPID!";
if (!extension_loaded($ext)) {
dl($fn);
echo '<br />did it ' . 'load it? (' . $fn . ')';
}
else
{
echo '<br />well, i guess' . ' it is already there';
}
?>