I've already seen this post PHP doesn't see mysql extension, but it didn't help me.
I use:
- Windows Seven (both 32bit in a VM and 64bit on a real pc)
- Apache 2.2 with SSL
- PHP 5.3.8
- MySql 5.5.23
In httpd.conf I configured Apache with PHP
PHPIniDir "C:\WEB\PHP\"
LoadModule php5_module "C:\WEB\PHP\php5apache2_2.dll"
ScriptAlias /php "C:/WEB/PHP/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
In php.ini I set
extension_dir = "C:/WEB/PHP/ext/"
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
MySql is started and working, but PHP does not see mysql.
I've also tried to copy libmysql.dll into %windir%\system32 and restarted web server, but it didn't work.
If you need I can post other info.
UPDATE 1:
Running <?php phpinfo(); ?> I can only see mysqlnd, but not mysql nor mysqli.
If I run php -i I see
mysql
MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $
UPDATE 2:
Apache, PHP and MySQL folders are the same of a previous working pc.
I copied them, reconfigured paths, installed and started services:
httpd -k install && httpd -k start
mysqld --install && net start mysql
UPDATE 3:
- I'm able to use mysql through a DOS console
- If I try to run an existing PhpMyAdmin I get
The mysql extension is missing. Please check your PHP configuration.
UPDATE 4:
I checked with Everything and the only php.ini I have on my pc is the one in php folder.
UPDATE 5:
I tried this code:
<?php
ini_set('display_errors', 'on');
error_reporting(E_ALL);
mysql_connect();
?>
and I get Fatal error: Call to undefined function mysql_connect() in C:\var\www\Apache\test.php on line 4
C:/web/php/ext/directory