Author: luck_m Source: Chinese PHP club
Recently, I bored my PHP environment, and I wrote the process, I hope there is no mistake.
First, from Official websites, 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
Step 1: Install Apache and configure support for PHP
Click the installation file Apache_2.0.50-win32-x86-no_ssl.msi
Install Apache in D: / Apache2 directory (with yourself)
----------------------------------- ----
| Note: Apache service is automatically installed and started after installation, as shown here:
| "(OS 10048) Usually each socket address (protocol / network address / port) is only allowed once:
| make_sock: could not bind to address 0.0.0.0:80 ... "General IIS occupied 80 ports
| Two solutions:
| 1. Open the Control Panel -> Services find IIS Admin Service Close and Disable
|
| 2, if you don't want to close the IIS service, change the port used by Apache to other ports.
| Apache2 / conf / httpd.conf
| Listen 80 Change to Listen (the port you want to use) such as Listen 8080
At this time, at this time you visit the Web service under your apache, add the port number after the domain name.
|
http: // localhost: 8080
|
| Then use CMD to enter the command line mode to enter you install Apache's directory / Apache2 / bin
| Enter
| Apache -k Install
| Apache -k Start
|
If you succeed, then do it below!
----------------------------------- -------------
Unzip the contents of php-5.0.0-win32.zip to D: / PHP
Find the php.ini-dist of the php.ini-dist of the php.ini and copy it to the Windows directory (Win2k is WinNT)
As my php.ini is copy to D: / windows directory
Then, the php5ts.dll in the HP directory is copied to the system directory (System / System32), if you are d: / windows / system
Configure httpd.conf in Apache
Open d: /apache2/conf/httpd.conf this file
Find AddDefaultCharset 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 your web directory (can not change) as my DocumentRoot "D: / Website"
Find DirectoryIndex index.html index.html.var Add index.htm index.php
Select Installation Mode: Modular mode installation or CGI mode installation (optionally)
-------------- Modular installation configuration ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Find #LoadModule SSL_Module Modules / MOD_SSL.SO this line, add a line after this trip
LoadModule PHP5_MODULE D: /PHP/PHP5APACHE2.DLL
Where d: / php/php5apache2.dll is the location of php5apache2.dll in your php directory
Locate AddType Application / X-gzip .gz .tgz, join a line after this line
AddType Application / X-httpd-php .php
-------------------------------------------------- ------------------
-------------- CGI installation configuration -------------------------------- ------------
Locate AddType Application / X-gzip .gz .tgz, join as follows
Scriptalias / PHP / "D: / PHP /"
AddType Application / X-httpd-php .php
Action Application / X-httpd-php "/php/php-cgi.exe"
-------------------------------------------------- -----------------
At this point, the PHP environment is basically configured.
Built a file content called Test.php in the web root directory (such as my D: / Website) as follows
echo phpinfo ();?>
Restart Apache Service
Use a browser to open
http://localhost/test.php
If you can see the PHP configuration output information is OK.
The second step is installed in Mysql (first-click, the configuration of this article does not apply to mysql4.1 and mysql5.0 version)
Install MySQL to the specified directory. If you are D: / mysql, if you download is a non-installed MySQL compression package, you can decompressed to the specified directory
Then click D: /Mysql/bin/winmysqladmin.exe in which D: / MySQL is your MySQL installation directory
Enter the initial user and password of Winmysqladmin (Note: This is not the user, password in MySQL, no need to pay
After confirming, the startup bar of your lower right corner will appear, the red light icon, the red light is on the service stop, the green light is on behalf of the service is normal.
If it is not a green light, the execution is as follows:
Left click this icon -> Winnt-> Install the service Install this service
Click this icon again -> Winnt-> Start The Service Launches MySQL Service
Modify the root password of the mysql database
Enter the life with CMD to enter the following command: (Note: D: / mysql is mysql installation directory)
CD D: / mysql / bin
mysqladmin -u root -p password 123456
Enter the cargo
ENTER Password: (Note: This is called you to enter the original password. The password is empty when you just install it.
At this time, the password of the account root in mysql is changed to 123456 installation.
Third, configure php.ini and test mysql (php.ini is pHP.ini under Windows)
Find extension_dir = "./" changed to extension_dir = "d: / php / ext"
turn up
EXTENSION = php_mysql.dll
Will ';' go to change
EXTENSION = php_mysql.dll
; session.save_path = "/ tmp"
Will ';' Remove Settings You Save Session Directory, such as
Session.save_path = "d: / php / session_temp";
Restart Apache Services
Establishing TestDb.php files in the web root directory (such as D: / Website) as follows:
PHP
$ link = mysql_connect ('localhost', 'root', '123456');
IF (! $ link) echo "fail";
Else Echo "Success";
MySQL_Close ();
?>
Use a browser to open
Http://localhost/testdb.php If the output SUCCESS is OK
Fourth, PHPMYADMIN installation configuration
Unzip phpMyadmin-2.5.7.zip to the web root directory, rename the folder to phpmyadmin or other
Open config.inc.php in the phpMyadmin directory
turn up
$ cfg ['Servers'] [$ I] ['User'] = 'root';
$ CFG ['Servers'] [$ I] ['Password'] = '123456';
Fill in your MySQL user and password, you can
If it is not used locally, it is best to add verification
I don't know if I write is right! However, I am basically worthy! It should be almost the same as learning.
What is wrong or missing, I hope everyone pointed out criticism! ---- BY LUCK_MLC
__________________
Just looking for [Hangzhou] PHP program development work ..... Which brother has a similar vacancy help introduction ....
QQ: 65712936 email: letian.10@163.com
This post was edited by Luck_mlc at 11:54 PM on September 25.
Recently, I bored my PHP environment, and I wrote the process, I hope there is no mistake.
First, from Official websites, 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
Step 1: Install Apache and configure support for PHP
Click the installation file Apache_2.0.50-win32-x86-no_ssl.msi
Install Apache in D: / Apache2 directory (with yourself)
----------------------------------- ----
| Note: Apache service is automatically installed and started after installation, as shown here:
| "(OS 10048) Usually each socket address (protocol / network address / port) is only allowed once:
| make_sock: could not bind to address 0.0.0.0:80 ... "General IIS occupied 80 ports
| Two solutions:
| 1. Open the Control Panel -> Services find IIS Admin Service Close and Disable
|
| 2, if you don't want to close the IIS service, change the port used by Apache to other ports.
| Apache2 / conf / httpd.conf
| Listen 80 Change to Listen (the port you want to use) such as Listen 8080
At this time, at this time you visit the Web service under your apache, add the port number after the domain name |
http: // localhost: 8080
|
| Then use CMD to enter the command line mode to enter you install Apache's directory / Apache2 / bin
| Enter
| Apache -k Install
| Apache -k Start
|
If you succeed, then do it below!
----------------------------------- -------------
Unzip the contents of php-5.0.0-win32.zip to D: / PHP
Find the php.ini-dist of the php.ini-dist of the php.ini and copy it to the Windows directory (Win2k is WinNT)
As my php.ini is copy to D: / windows directory
Then, the php5ts.dll in the HP directory is copied to the system directory (System / System32), if you are d: / windows / system
Configure httpd.conf in Apache
Open d: /apache2/conf/httpd.conf this file
Find AddDefaultCharset 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 your web directory (can not change) as my DocumentRoot "D: / Website"
Find DirectoryIndex index.html index.html.var Add index.htm index.php
Select Installation Mode: Modular mode installation or CGI mode installation (optionally)
-------------- Modular installation configuration ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------
Find #LoadModule SSL_Module Modules / Mod_ssl.so, join the line after this line
LoadModule PHP5_MODULE D: /PHP/PHP5APACHE2.DLL
Where d: / php/php5apache2.dll is the location of php5apache2.dll in your php directory
Locate AddType Application / X-gzip .gz .tgz, join a line after this line
AddType Application / X-httpd-php .php
-------------------------------------------------- ------------------
-------------- CGI installation configuration -------------------------------- ------------
Locate AddType Application / X-gzip .gz .tgz, join as follows
Scriptalias / PHP / "D: / PHP /"
AddType Application / X-httpd-php .php
Action Application / X-httpd-php "/php/php-cgi.exe"
-------------------------------------------------- -----------------
At this point, the PHP environment is basically configured.
Built a file content called Test.php in the web root directory (such as my D: / Website) as follows
echo phpinfo ();?>
Restart Apache Service
Use a browser to open
http://localhost/test.php
If you can see the PHP configuration output information, the second step is installed in the second step to install MySQL (first name, this article does not apply to Mysql4.1 and mysql5.0 version)
Install MySQL to the specified directory. If you are D: / mysql, if you download is a non-installed MySQL compression package, you can decompressed to the specified directory
Then click D: /Mysql/bin/winmysqladmin.exe in which D: / MySQL is your MySQL installation directory
Enter the initial user and password of Winmysqladmin (Note: This is not the user, password in MySQL, no need to pay
After confirming, the startup bar of your lower right corner will appear, the red light icon, the red light is on the service stop, the green light is on behalf of the service is normal.
If it is not a green light, the execution is as follows:
Left click this icon -> Winnt-> Install the service Install this service
Click this icon again -> Winnt-> Start The Service Launches MySQL Service
Modify the root password of the mysql database
Enter the life with CMD to enter the following command: (Note: D: / mysql is mysql installation directory)
CD D: / mysql / bin
mysqladmin -u root -p password 123456
Enter the cargo
ENTER Password: (Note: This is called you to enter the original password. The password is empty when you just install it.
At this time, the password of the account root in mysql is changed to 123456 installation.
Third, configure php.ini and test mysql (php.ini is pHP.ini under Windows)
Find extension_dir = "./" changed to extension_dir = "d: / php / ext"
turn up
EXTENSION = php_mysql.dll
Will ';' go to change
EXTENSION = php_mysql.dll
turn up
; session.save_path = "/ tmp"
Will ';' Remove Settings You Save Session Directory, such as
Session.save_path = "d: / php / session_temp";
Restart Apache Services
Establishing TestDb.php files in the web root directory (such as D: / Website) as follows:
PHP
$ link = mysql_connect ('localhost', 'root', '123456');
IF (! $ link) echo "fail";
Else Echo "Success";
MySQL_Close ();
?>
Use a browser to open
Http://localhost/testdb.php If the output SUCCESS is OK
Fourth, PHPMYADMIN installation configuration
Unzip phpMyadmin-2.5.7.zip to the web root directory, rename the folder to phpmyadmin or other
Open config.inc.php in the phpMyadmin directory
turn up
$ cfg ['Servers'] [$ I] ['User'] = 'root';
$ CFG ['Servers'] [$ I] ['Password'] = '123456';
Fill in your MySQL user and password, you can
If it is not used locally, it is best to add verification
I don't know if I write is right! However, I am basically worthy! It should be almost the same as learning.
What is wrong or missing, I hope everyone pointed out criticism! ---- BY LUCK_MLC
_________________ is looking for [Hangzhou] PHP program development work ..... Which brother has a similar vacancy help introduce ....
QQ: 65712936 email: letian.10@163.com
This post was edited by Luck_mlc at 11:54 PM on September 25.