note 3147 deleted from Installation on Windows 95/98/NT systems by ronabop
| From: | ronabop@php.net | Date: | Tue, 23 Jan 2001 02:34:50 +0000 |
| Subject: | note 3147 deleted from Installation on Windows 95/98/NT systems by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-10155@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:WINDOWSSYSTEM 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:WINDOWSSYSTEM;%PATH% after other eventual PATH lines. REBOOT THE SYSTEM !!!
2. Place a copy of libmySQL.dll in the C:WINDOWSSYSTEM 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:PHP4modules. The full path to the dll would be
C:PHP4modulesphp_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:PHP4modulesphp_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:PHP4modulesphp_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:PHP4modules ; 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