Voodoo Jai Posted March 29, 2008 Share Posted March 29, 2008 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 Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 29, 2008 Share Posted March 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
Voodoo Jai Posted March 29, 2008 Author Share Posted March 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 29, 2008 Share Posted March 29, 2008 Are you sure you're are editing the correct php.ini? PHP is reading a php.ini in C:\php5 is the same place as the php.ini you're editing? Also make sure you are restarting Apache when you make any changes to the php.ini too. Quote Link to comment Share on other sites More sharing options...
Voodoo Jai Posted March 29, 2008 Author Share Posted March 29, 2008 Sure but the phpinfo says its reading windows Configuration File (php.ini) Path C:\Windows Loaded Configuration File C:\php5\php.ini yes restarting apache as well Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 29, 2008 Share Posted March 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted March 29, 2008 Share Posted March 29, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.