I have done a lot of development using ASP and MS-SQL. This is my first foray into PHP and MySQL…
First: I am using:
PHP version 5.0.0.0
MySQL version 5.0.45
IIS version 5
Windows XP Pro
Using MySQL admin tool, I:
Set password for root user in MySQL
Created DB and tables
Added a record to one table
I am starting out very simple just to verify I can retrieve from the DB. So I have this line in a php file:
$conn = new mysqli(‘localhost’, ‘root’, ‘pswd’, ‘Testdb’);
I get this error message in the browser:
Fatal error: Class ‘mysqli’ not found in C:SourceCodeTestTest.php on line 11
PHP has encountered an Access Violation at 01F373CD
Here’s what I’ve tried so far:
php.ini:
removed comment for “extension=php_mysql.dll”
Added “extension=php_mysqli.dll” since it wasn’t there
tried various values for “extension_dir” setting; currently at default value of “./”
files:
Added c:php and c:phpext to path
copied dlls from c:phpext to c:php (where php.exe and libmysqli.dll are located)
I restart the IIS service after every change, assuming the php.ini values are only read the first time each browser session. Any suggestions are appreciated…