MySQL Forums
Forum List  »  PHP

Re: Cannot load mysql extension. Please check your PHP configuration
Posted by: Peter Brawley
Date: July 02, 2009 08:49AM


You report your PHP version as "2.9.2", I think there is no such version. Is that your phpMyAdmin version perhaps?

>> php connect.php
>"Fatal error: call to undefined function mysql_connect() in c:\php\connect.php on line 2"

The only way I know to produce that error is for the copy of php.ini that PHP is using to have the line ...


commented or missing. You say that's not the case, so try this test:

Open a new DOS window and execute these cmds:

cd \php
md test
REM note that this path cmd applies only to the current window:
set path=
copy libmysql.dll test
copy php.exe test
copy php.ini test
copy php5apache2_2.dll test
copy php5ts.dll test
copy connect.php test
cd test
php connect.php

If you still get the error, your copy of libmysql.dll is farkakt. If you do not get the error, there is another (and wrong) copy of PHP in the path which PHP is using (except in this isolation test)..

>> 2. Where is Apache's copy of php.ini?
>c:\Program Files/Windows NT

Oy. If apache is installed in c:\apache, a copy of c:\php\php.ini should be in c:apache\bin.

>> 4. What are your php.ini settings for ...
>> LoadModule php5_module
>This keyword does not appear in my php.ini

My mistake. I ought to have said c:\apache\conf\httpd.conf


Options: ReplyQuote

Written By
Re: Cannot load mysql extension. Please check your PHP configuration
July 02, 2009 08:49AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.