I finally got this to work and so I'll post my findings here.
PHP 5:windows Build needs a MySQL DLL
PHP 5.0 doesn ' t come with MySQL support ... You has to get the librariesyourself ...
I think u can get them from mysql.com
PHP 5 Beta 2
The file Php_mysql.dll comes with these snapshots, as well as a new version of LibmySQL.dll,
So I suggest a full upgrade to Beta 2 instead of just extracting php_mysql.dll for use with Beta 1.
--------------------------------------------------------
To www.jetdown.com download the following three kinds of software, ready for installation
Apache_2.0.47-win32-x86-no_ssl.msi
Mysql-4.0.14-win.zip
Phpmyadmin-2.5.3-rc1-php.zip
----------------------------------------------------------------------------------------------
PHP 5 Beta 2 http://snaps.php.net/win32/php5-win32-latest.zip size:5.87 MB (6,162,835 bytes)
----------------------------------------------------------------------------------------------
<1> Installation configuration PHP
1. Unzip the PHP compression pack to C:\php\
2. Copy all files under the Php4ts.dll and C:\php\dlls directories in the C:\php\ directory to the System folder in the Windows installation directory
(Win9x/me is the system directory, winnt,2k/winxp,2003 is the system32 directory)
Copy the C:\php\php.ini-dist to the Windows installation directory (for example: C:\Windows) and rename it to PHP.ini. Open with Notepad and modify the information:
Search Extension_dir =./This line and point its path to the extensions directory in your PHP directory, such as:
Extension_dir = C:\php\extensions
To support more modules, search for:
; Windows Extensions
; Note that MySQL and ODBC support are now built in, so no DLLs are needed for it.
The following is a semicolon in the previous comment out the supported extension module, if you want PHP to support a module, please put the previous ";" Remove and then
After the modification is complete, save the php.ini to complete the installation and configuration of PHP.
Let's add a line below
Extension=php_mysql.dll
Note 1:the extension dir need not being ". \", as Hermawan mentioned. It works fine for me with the extensions subdir where the other extensions is located.
Note 2:the php.ini file need not being in the Apache root, as Lars mentioned. It works fine for me in the Windows dir.
<2> installation Apach2
1. Back up the C:\Program files\apache group\apache2\conf\httpd.conf file.
2. Open C:\Program Files\apache group\apache2\conf\httpd.conf with Notepad
Found it:
#NameVirtualHost *
Modified to:
Namevirtualhost 127.0.0.1//or localhost
Found it:
Modify the following lines:
ServerAdmin (the Admin box you entered when you just installed)
DocumentRoot C:\Program Files\apache Group\apache2\htdocs
ServerName Apache2
Errorlog C:\Program Files\apache Group\apache2\logs\error_log
Customlog C:\Program Files\apache Group\apache2\logs\access_log Common
Found it:
AddType Application/x-tar. tgz
Add the following two lines below:
AddType application/x-httpd-php. php
AddType Image/x-icon. ico
Found it:
#LoadModule Ssl_module modules/mod_ssl.so
Add a line below:
LoadModule php5_module C:\php\sapi\php4apache2.dll//Here Php5_module is the key, if Php4_module Apache will not boot up
Add default file:
Find DirectoryIndex * This line, you can modify this, add the default file name:
DirectoryIndex index.php default.php index.htm index.html default.htm default.html
Save the file and re-start the Apache server.
Finally, add the following two lines to the end of the file
scriptalias/php/"c:/php/"
Action application/x-httpd-php "/php/php.exe"
To this Apache PHP environment has been completely established.
<3> Test:
Use Notepad to create a new file, write down the following lines, save to C:\Program files\apache Group\apache2\htdocs directory, this directory is your site and directory, named phpinfo.php. then enter http:/in the browser /localhost/phpinfo.php will be able to see the information about PHP.
The phpinfo.php code is as follows:
Phpinfo ();
?>
<4> install MySQL
1. Install by default on C:\mysql
Copy the following files to the Apache modules directory:
Php\php4ts.dll
Php\sapi\php4apache2.dll
Php\dlls\iconv.dll
If any of these files is missing in the modules directory, Apache would fail to start.
Be sure the extension can find the following files:
Php_mysql.dll
Iconv.dll
LibmySQL.dll
If any of the them can ' t be found, Apache would start but would issue a warning like this: "Unknown (): Unable to load dynamic Li Brary ' C\php\extensions\php_mysql.dll '-the specified module could not be found. "
Php_mysql.dll should is in the extensions directory.
Iconv.dll should is in the Apache modules directory.
LibmySQL.dll must is either in the Apache root directory or the Windows system directory. I prefer the former because it ' s cleaner, as other applications don ' t necessarily use this MySQL library version.
Note 3:be sure to use the LibmySQL.dll file bundled with PHP. In my case, trying to use the LibmySQL.dll from the MySQL 4.1 Alpha package resulted in this error message: "Unknown (): Un Able to load Dynamic library ' C:\php\extensions\php_mysql.dll ' – The specified procedure could not being found. "
Start Apache and everything should be fine.
2. Run C:\mysql\bin\winmysqladmin.exe to set user and password
3. Run MySQL and test
mysql> show databases;
+-----------+
| Databases |
+-----------+
| MySQL |
| Test |
+-----------+
If the above screen appears, MySQL has been installed successfully;
2. Change the administrator password of the MySQL system (Xinmi password to the password you want to set)
mysql> UPDATE user SET password=password (' Xinmi password ') where user= ' root ';
3. Edit the startup file PHP.ini in the php5 and connect MySQL and php5 together.
mysql.default_port=
mysql.default_host=
Mysql.default_user=
mysql.default_password=
Switch
mysql.default_port=3306 shows that the default port for MySQL is typically 3306
Mysql.default_host=localhost describes the default host name for MySQL
Mysql.default_user=jinchao describes the default user name for MySQL (Root is the most advanced user)
mysql.default_password=666666 setting the administrator's password
After the modification, restart Apache to view the Phpinfo page.
<5> Installation phpMyAdmin
Modify C:\Program Files\apache group\apache2\htdocs\phpmyadmin\config.inc.php
Find the following paragraph:
$i = 0;
The $cfg [' Servers '] array starts with $cfg [' Servers '][1]. Do not use $cfg [' Servers '][0].
You can disable a server config entry by setting host to '.
After this paragraph continue to look for:
Find $cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; Change "config" to "cookie" or "http"
Find $cfg[' Servers ' [$i] [' host '] = ' localhost '; Modify the situation as appropriate.
Find $cfg[' Servers ' [$i] [' user '] = ' root '; Modify the situation as appropriate.
Find $cfg[' Servers ' [$i] [' password '] = '; Modify the situation as appropriate.
Find $cfg[' Servers ' [$i] [' port '] = ' 3306 '; Modify the situation as appropriate.
http://www.bkjia.com/PHPjc/313743.html www.bkjia.com true http://www.bkjia.com/PHPjc/313743.html techarticle ifinallygotthistowork,soiwillpostmyfindingshere.//php5:windowsbuildneedsamysqldll//PHP5.0doesn ' Tcomewithmysqlsupport ... Youhavetogetthelibrariesyourself ...//ithinkucangetthemfromm ...