note 10829 added to Installation of Windows Modules

From: Date: Tue, 23 Jan 2001 02:34:38 +0000
Subject: note 10829 added to Installation of Windows Modules
Groups: php.notes 
Request: Send a blank email to php-notes+get-10154@lists.php.net to get a copy of this message
MySQL Extension Installation notes for Windows 98 These notes are for PHP 4 beta 3 but I think it could also be helpful to install other versions. I have spent some time to get this extension working properly so I decided to share these notes with whom is facing this problem. I was obtaining the same message as AdiF@Home.com (27-Nov-1999 05:11) from PHP : Fatal error: Unable to load dynamic library 'c:/somedir.../php3_dbm.dll' One of the library files needed to run this application cannot be found. in... To install the MySQL extension you need the following files: libmySQL.dll (MySQL run time library) php_mysql.dll (the PHP extention) These file are in mysql-php-4.0b3-Win32.zip (www.php.net Windows download page). I also assume PHP4 has been installed correctly. There it goes: 1. Check to see if the PATH environment variable includes C:\WINDOWS\SYSTEM and C:\WINDOWS To do this, open a DOS Windows and type PATH (Enter). If you do not see these directories in the PATH, go to the root directory (CD\ enter) and edit the AUTOEXEC.BAT file (edit AUTOEXEC.BAT enter) Insert the following line: PATH=C:\WINDOWS;C:\WINDOWS\SYSTEM;%PATH% after other eventual PATH lines. REBOOT THE SYSTEM !!! 2. Place a copy of libmySQL.dll in the C:\WINDOWS\SYSTEM directory. 3. Place php_mysql.dll in a directory of your choice. I suggest you create a subdirectory of the directory where PHP4 is installed, lets say : C:\PHP4\modules. The full path to the dll would be C:\PHP4\modules\php_mysql.dll 4. If PHP4 has been installed as recommended the file php.ini is in the C:\WINDOWS directory. We need to set the following lines in it: extension_dir = ; directory in which the loadable extensions (modules) reside This indicates where PHP should look for extension dll's. We leave it blank. extension=C:\PHP4\modules\php_mysql.dll Here we tell PHP to load the dll at startup. We use the full path. The same dll could be loaded dynamically by <? dl("C:\PHP4\modules\php_mysql.dll"); ?> In this case, *do not* loaded at startup. If you do not want to deal with absolute paths you could set : extension_dir = C:\PHP4\modules\ ; PHP will look here for dll's... extension=php_mysql.dll ; ...you just give the module name Dynamically : <? dl("php_mysql.dll"); ?> 5. One last thing: make sure you have MSVCRT.DLL and PHP4TS.DLL in the C:\WINDOWS directory in order to run PHP4 correctly. Good work, paulo paganelli http://www.php.net/manual/en/install-windows-modules.php

« previous php.notes (#10154) next »