The simple configuration method of APACHE+PHP5+MYSQL4+PHPMYADMIN under Win2003

  

Firstly from the official website, APACHE2.050, PHP5, MYSQL4.0.20, PHPMYADMIN2.57apache_2.0.50-win32-x86-no_ssl.msi php-5.0 .0-Win32.zipmysql-4.0.20d-win.zipphpMyAdmin-2.5.7.zipOperating system win2003 system disk is: D disk
Step 1: Install apache and configure support PHP
Click the installation file apache_2.0.50-win32-x86-no_ssl.msi to install apache in the D:\\apache2 directory (as you like) and extract the contents of php-5.0.0-Win32.zip to D:\\php. Rename php.ini-dist in php directory to php.ini and copy it to windows directory (winnt in win2k). My php.ini is copied to D:\\windows directory and then php5ts.dll in php directory. , libmysql.dll copy to the system directory (system /system32) If I am D: \\ windows \\ system configure httpd.conf in apache open D: \\ Apache2 \\ conf \\ httpd.conf This file find AddDefaultCharset ISO-8859- 1 Change it to AddDefaultCharset GB2312 (let the default language code Simplified Chinese) find DocumentRoot "D:/Apache2/htdocs" Change it to your WEB directory (may not change) as my DocumentRoot "D:/website" find DirectoryIndex index.html index.html.var Add index.htm index.php later to select the installation mode: Modular mode installation Or CGI mode installation (optional) -------------- Modular installation configuration --------------------- -------------- Find #LoadModule ssl_module modules/mod_ssl.so This line, after this line add a line LoadModule php5_module d:/php/php5apache2.dll where d:/php/php5apache2. The dll finds the AddType application/x-gzip .gz .tgz line in the php directory where php5apache2.dll is located. After this line, add a line AddType application/x-httpd-php .php-------- -------------------------------------------------- -------------------CGI installation configuration ---------------------------- ---------- Find the AddType application/x-gzip .gz .tgz line, 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 has been configured successfully in the WEB root The directory (such as my D:\\website) has a file named test.php as follows: <? echo phpinfo(); ?> Restart the apache service and open http://localhost/test.php with a browser. If you can see the php configuration output information is OK Second step to install mysql
Install mysql to the specified directory, such as my d:/mysql If you download the non-installed mysql compressed package, directly extract to Specify the directory and click D:\\mysql\\bin\\winmysqladmin.exe. This file D:\\mysql is the initial user and password of winmysqladmin in your mysql installation directory (Note: this is not the user and password in mysql) After filling in the post, you will see a traffic light icon in the launch bar of your lower right corner. The red light indicates that the service is stopped, the green light indicates that the service is normal. Left click on the icon -> winnt->install the service Install this service Then left click on this icon ->winnt->start the service Start the mysql service to modify the root password of the mysql database with cmd Enter the following line mode: (Note: d:\\mysql is the mysql installation directory) cd d:\\mysql\\binmysqladmin -u root -p password 123456 Enter Enter password: (Note: This is for you to enter the original Password. The password is empty when you install it, so you can directly press Enter. At this time, the password of the account root in mysql is changed to 123456. Installation is complete Three, configure php.ini and test mysql (php.ini is d:\\ Php.ini under windows)
find extension_dir = "./" to extension_dir = "d:/php/ext"found;extension=php_mysql.dll will be changed to 'extension=php_mysql. Dll found; session.save_path = "/tmp" will ';' remove the directory where you saved the session, such as session.save_path = "D:/php/session_temp"; restart the apache service in the web root directory (such as D :\\website) Create the testdb.php file as follows: <?php$link=mysql_connect('localhost','root','123456');if(!$link) echo "fail";else echo " Success";mysql_close();?>Open http://localhost/testdb.php with a browser. If the output success is OK four Phpmyadmin installation configuration
extract phpMyAdmin-2.5.7.zip into the WEB root directory, rename the folder to phpmyadmin or other config.inc.php in the phpmyadmin directory to find $cfg['Servers'][ ,null,null,3],$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = '123456'; Fill in your mysql user and password separately if not used locally. Best to add verification

Copyright © Windows knowledge All Rights Reserved