Jump to content

mysqli.dll - sure I've configured it but not showing in the test phpinfo file


Recommended Posts

Using PHP Version 5.2.5

Apache 2.2.6

Windows Vista

 

Hi all I have had this all working before and made notes but now after installing on another PC it wont show the mysqli.dll extension. I have inserted

 

extension_dir = "C:/php5/ext/"
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_mbstring.dll

 

in the php.ini file

 

the http.conf file has the following

 

LoadModule php5_module "C:/php5/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php5"

 

I think the only difference that I can see from the install is the line

 

LoadModule php5_module "C:/php5/php5apache2_2.dll"

 

which was

 

LoadModule php5_module "C:/php5/php5apache2.dll"

 

I think It was an upgrade to the old package. WHen I use the phpinfo.php to view the configuration the following is shown:

 

Configuration File (php.ini) Path 	C:\Windows
Loaded Configuration File 	         C:\php5\php.ini

 

the mysql.dll and mbstring.dll are showing but not the mysqli.dll file.

 

Have I missed something out.

 

Many thanks VoodooJai

Link to comment
Share on other sites

Ok I think I know what the problem is. PHP is reading the php.ini which is a good sign, but the extension php_mysqli.dll (or php_mysql.dll) both require an external library called libmysql.dll . This file should be located in the root of your php folder (C:\php5)

 

The problem is the php executable (php.exe) never checks for files in the directory the executable is located in. This is because PHP only checks in key places which are the Registery, C:\Windows (and C:\WINDOWS\System32) and the PATH. What I'd suggest you to do instead is to add PHP to the Path Environment Variable this will be the most effective method.

 

NOTE: If you installed PHP using the PHP Installer then I recommend you to download the zipped binaries package and extract the contents of the zip to C:\php5 overwriting existing files/folders. The Installer version comes with limited files.

Link to comment
Share on other sites

Ok I think I know what the problem is. PHP is reading the php.ini which is a good sign, but the extension php_mysqli.dll (or php_mysql.dll) both require an external library called libmysql.dll . This file should be located in the root of your php folder (C:\php5)

 

The problem is the php executable (php.exe) never checks for files in the directory the executable is located in. This is because PHP only checks in key places which are the Registery, C:\Windows (and C:\WINDOWS\System32) and the PATH. What I'd suggest you to do instead is to add PHP to the Path Environment Variable this will be the most effective method.

 

NOTE: If you installed PHP using the PHP Installer then I recommend you to download the zipped binaries package and extract the contents of the zip to C:\php5 overwriting existing files/folders. The Installer version comes with limited files.

 

I forgot to say that the libmysql.dll is in the root of the php folder and the environmental variables have been added, but still nothing.

Link to comment
Share on other sites

Do not get pulled into that trap, with the following line:

Configuration File (php.ini) Path    C:\Windows

The path that PHP states for that line is the default path in which PHP checks for the php.ini. If PHP was reading a php.ini in C:\Windows it will be like so:

Configuration File (php.ini) Path    C:\Windows\php.ini

Or

Configuration File (php.ini) Path    C:\Windows\System32\php.ini

This where alot of people get confused with where the php.ini is/should be.

 

The line you should concentrate on is the Loaded Configuration File line. If PHP could not find a php.ini anywhere then that line would be set to (none), eg:

Loaded Configuration File   (none)

As that line is set to C:\php5\php.ini then that is location you should find the php.ini to edit.

Link to comment
Share on other sites

Can you confirm that php_mysql.dll and php_mysqli.dll are of the same build version. When you go to C:\php5\ext using Windows Explorer the files should be layout out in Tiled view, eg:

 

file1  file2

file3  file4

etc

 

When you look at each individual file you'll see there is three pieces of information shown to the right of the file icon. The first line is the file name (eg, php_mysql.dll) , second line is the build/version number (must be the same as your PHP Version, eg 5.2.5.5) and the third line will be the extension name. Can you verfiy that the secound line for both files (php_mysql.dll and php_mysqli.dll) are the same.

 

All extension must be of the same build/version as the main php executable (php.exe) otherwise they will not load.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.