I have recently bored my own PHP environment, and I will write the process, I hope that there is no misoperative version of Apache2.050, php5, mysql4.0.20, phpMyadmin2.57
Apache_2.0.50-win32-x86-no_ssl.msi
PHP-5.0.0-win32.zip
mysql-4.0.20d-win.zip
phpMyadmin-2.5.7.7.zip
Operating system WIN2003 system disk is: D disk first step: Install apache and configure support PHP Click Installation file Apache_2.0.50-win32-x86-no_ssl.msi to install Apache in d: / apache2 directory (with you like) PHP -5.0.0-Win32.zip The content is decompressed to D: / PHP to find the php.ini-dist of the php.ini-distth to renamed PHP.INI and copy it to the Windows directory (Win2k for Winnt) as my PHP. INI is copy to D: / windows directory to copy php5ts.dll, libmysql.dll in the PHP directory (System / System32), if you are d: / windows / system configuration Apache httpd.conf open D: /Apache2/conf/httpd.conf This file found AddDDefaultCharset ISO-8859-1 to change it to AddDefaultCharset GB2312 (let the default language to encode Simplified Chinese) Find DocumentRoot "D: / Apache2 / HTDOCS" to change it to you Web Directory (Non-change) If I find DIRECTROOT "D: / Website" to find DirectoryIndex index.html index.html.var Add INDEX.HTM INDEX.PHP Select Installation Mode: Modular mode installation or CGI mode installation (select The same can be) -------------- Modular installation configuration -------------------------------------------------------------------------------------------------------------------- -------- Find #LoadModule SSL_Module Modules / MOD_SSL.SO this line, add a line loadModule php5_module d: /php/php5apache2.dll after this line where D: / php/php5apache2.dll is in your php directory PHP5APACHE2.DLL location Location finds the address of AddType Application / X-Gzip .gz .tgz, add a line of addtype application / x-httpd-php .php after this line -------------- -------------------------------------------------- - ------------ CGI installation configuration --------------------------------- --- Find the line of addtype application / x-gzip .gz .tgz, add Scriptalias / PHP / "D: / php /" addtype application / x-httpd-php .phpaction application / x-httpd-php " / php/php-cgi.exe"--------------------------- ---------------------- At this point, the PHP environment is basically configured to build a name TEST in the web root directory (such as my D: / Website). The file content of PHP is as follows echo phpinfo ();?> Restart Apache service with browser open
http://localhost/test.php
If you can see the PHP configuration output information, the second step is installed in the second step. Mysql will be installed to the specified directory. Click D: /Mysql/bin/winmysqladmin.exe this file where D: / mysql is your MySQL installation directory Entering Winmysqladmin's initial user, password (Note: This is not MySQL, password) Just fill in it, you will be able to determine you after you The upper right corner task's startup bar will appear a traffic light icon, the red light is on behalf of the service stop, the green light is on behalf of the service is normal, the left click this icon -> WinNT-> Install the service to install this service, click this icon -> Winnt -> Start the service Start the mysql service to modify the mysql database root password with cmd enters the life. This line mode input is as follows: (Note: D: / mysql is mysql installation directory) CD D: / mysql / binmysqladmin -u root -p password 123456 Enter Password: (Note: This is the original password. Just installed the password is empty, so you can use it directly) At this time, the password of the account root in MySQL is changed to 123456 installation. 3, configure PHP .ini and test MySQL (php.ini pHP.ini under d: / windows) found extension_dir = "./" changed to extension_dir = "d: / pHP / ext" found; extension = php_mysql.dll will ';' Remove to extension = php_mysql.dll to find; session.save_path = "/ tmp" will ';' remove you to save the session directory, such as session.save_path = "d: / php / session_temp"; restart the Apache service in the web root Under the directory (such as D: / Website) Establishing TestDb.php file content as follows: Php $ link = mysql_connect ('localhost', 'root', '123456'); if (! $ Link) echo "fail"; Else Echo "Success"; mysql_close ();?> Open http://localhost/testdb.php with your browser
If the output SUCCESS is OK, the installation of phpMyAdmin decompresses phpMyadmin-2.5.7.zip to the web root directory, rename the folder to phpMyAdmin or other CONFIG.INC.PHP in the phpMyadmin directory to find $ CFG [ 'Servers'] [$ I] ['user'] = 'root'; $ cfg ['servers'] [$ I] ['password'] = '123456'; fill in your MySQL user and password If it is not used locally, it is best to correct it, I don't know if it is right! However, I am basically worthy! It should be almost the same as learning.