So deliberately wrote this configuration document, I believe that the following steps you will be successful. I hope you'll be correct in the wrong place.
This example is under Wiondws XP
php5.2.1 (Zip)
apache2.2.4
MySQL5.0.37
phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
Installation and configuration of
the installation of Apache
1-click APAHCE installation Package
2 Acceptance Agreement
3 The following 3 items can be easily filled
Apache listens on port 80. If IIS uses 80 ports, modify the IIS port or Apache port to avoid conflict
4 The default here is typical, click Next.
5 You can modify the installation path here, note that the installation path can not contain Chinese.
6 Click Install Start installation
7 after the installation is complete, enter in the browserhttp://localhostOrhttp://127.0.0.1
If you can see this page, prove that the Apache installation is successful, you can explain the static page
installation of MySQL
1-click MySQL installation package
2 The default is typical, if you want to modify the installation path can also choose Custom.
Note: Install MySQL in the path, can not contain Chinese!
3 Click Intall Start Installation
4 Skip Registration
5 Do you want to configure MySQL now? You can also configure it later in the Configuration Wizard of the Start menu.
Here is the configuration now
6 Select detailed Configuration (Details set), click Next to continue
7 The option below is to choose what type of MySQL is applied to, the first is to developServer,
will only use as little memory as possible, the second is a normal Web server, will use a medium amount of memory,
The last one is that this server only runs the MySQL database, will occupy all the memory.
Users can choose the options according to their own needs. Only the development server is selected here, click Next to continue
8 The following is the choice of database uses, the first is multi-purpose use,
The database is optimized to be a good InnoDB (transaction) storage type and an efficient MyISAM (non transactional) storage type.
The second is for transaction type only, the best optimization innodb, but also support MyISAM, only MyISAM support Full-text indexing
The last one is a simple network development, suitable for simple applications, only myisam types that do not support transactions are supported.
Generally choose the first multi-functional.
9 Below is the choice of INNODDB data storage location, generally default well, do not need to change
(If you want to modify the data save path, you can also modify the value of the My.ini datadir after installation)
10 The following is the choice of MySQL allowed maximum number of connections, the first is the maximum number of 20 connections concurrency,
The second is the maximum of 500 concurrent connections, the last is a custom, you can choose according to your own needs.
Here Select the first
11 below is whether to run the network link. Select the check box here. The port on which the database listens, the default is 3306,
If you change to another port, you must remember the modified port when you connect to the database, otherwise you cannot connect to the MySQL database.
More trouble, here do not make changes, with mysq default port: 3306
12 This step sets the default encoding for MySQL, which defaults to latin1 and standard encoding. The second is UTF8, and the third is manual setting.
The encoding is introduced in version 4.1. If you want to use the original database data, it is best to determine what the original database is encoded, if the code set here
and the original database data encoding inconsistent, in the use of the time may appear garbled. Latin1 Standard encoding is recommended
Of course, if we need to, we can also modify its encoding (not recommended).
13 This step is whether to set MySQL as Windows Services, the general choice to set up a service,
This allows you to start and close the MySQL database in the service. Recommended: The following check box is also checked,
In this way, in cmd mode, you do not have to execute commands under the MySQL Bin directory. Consulting at the command line can execute file
14 This step is to set MySQL's superuser password, this super user is very important,
With all the permissions on MySQL, set and keep in mind the superuser password,
A check box below indicates the creation of an anonymous account, which makes the database system unsafe.
If there is such a demand, please tick.
15 Click Execute to install
16 Click Finish finishes installation
17 We can start using MySQL, open the Start menu All Programs MySQL Command line Client, enter the password
This interface appears to indicate that MySQL is installed.
problems that may arise:
If you appear in step 15th, the following figure prompts
It's because you've been in MySQL before. Some of the configuration files were also retained while uninstalling.
Click Retry to see if you can pass. Otherwise click Cancel to exit. Then click on the Start menu of MySQL Server Instance Config Wizard
Re-configuring MySQL
Repeat the previous action. The 14th step will appear as follows
There are three places to enter the password, you originally installed MySQL.
You enter the original root password in the first text box, and then enter the new password for root in the two text boxes below.
If it's still not working, then reload MySQL once.
Reload Note: It is best to delete all the original files, if necessary, you can clear the registry,
If you don't have other MySQL-related programs on your machine, you must remember not to keep the original My.ini files.
Also, delete the file under the original installation path and delete the Ibdata1 file under the data directory.
More Articles PHP enthusiasts stationhttp://www.phpfans.net
installation of PHP
Because PHP is a zip file (not install version), the installation is simpler
Unzip the line. Rename the extracted Php-5.2.1-win32 to PHP5. and copy it to the C disk directory. That is, the installation path is C:\PHP5
1 Locate the php.ini.recommended (or php.ini-dist) file in the PHP directory and rename it to PHP.ini
and copy it to the Windows directory of the system disk (for example, C:\Windows).
2 then copy the Php5ts.dll,libmysql.dll in the PHP directory to the directory C:\Windows\System32.
3 Copy the Php_gd2.dll,php_mysql.dll,php_mbstring.dll file under the Php5\ext directory to C:\Windows\System32
Note: Don't confuse Php_mysql.dll with Php_mssql.dll
If you do not load Php_gd2.dll PHP will not be able to process the image. Php_mysql.dll PHP will not support MySQL function library without loading
Php_mbstring.dll supports wide characters when using phpMyAdmin later
More Articles PHP enthusiasts stationhttp://www.phpfans.net
installation of Zendoptimizer
Zend Optimizer uses optimized code to improve the execution speed of PHP applications. Executing PHP programs that use Zend Optimizer is 40% to 100% faster than you would not use. And some files that have been encrypted with Zend safeguard must be installed Zend Optimizer to run.
Note: Zend Optimizer installation does not affect the normal operation of PHP, if you feel trouble, this step can be omitted.
1-click Installation Zend Optimizer
2 Accept the agreement, click Next
3 Selected Installation path
4 selected Apache version, we use apache2.2.4, so choose apache2.x here
5 designates the position of the php.ini. We're under C:\WINDOWS\.
6 Select the Apache installation path. Ours is C:\Program files\apache Software foundation\apache2.2. So change it.
7-click Install for installation
8 Click Yes. Setup automates configuration and server restart.
9 Click Finish finishes installation
We'll configure everything after the installation is complete.
Configure PHP and associate MySQL
Open C:\windows\php.ini File
The following items need to be answered to see
1 Setting the extension path
Find Extension_dir there's a line
Extension_dir = "./"
Change this row to
Extension_dir = "C:\php5\ext"
Where C:\PHP5 is the path where you install PHP. Incorrect path will not load DLL
(Note: some PHP versions are; extension_dir = "./" To remove the preceding semicolon)
2 Find separately
; Extension=php_mbstring.dll
; Extension=php_gd2.dll
; Extension=php_mysql.dll
Remove the semicolon before the top 3 items so that the Apache can load these DLLs when it starts
Be careful not to confuse extension=php_mysql.dl with; extension=php_mssql.dl
Of course, we've also copied these DLLs into the system32 before. (Everyone notices how to load some DLLs into the installation process.)
Later to load some DLLs, such as Php_mysqli.dll, also know how to load the
3 Set Session Save path
Find Session.save_path there's a line
; Session.save_path = "N;/path"
After this row, add a line (Note that you are joining a line, not adding to the back)
Session.save_path = "C:\WINDOWS\Temp"
Save to your temp directory, this can be saved to the Windows Temp directory under Temp
4 There are more noteworthy is short_open_tag. Some PHP versions are off by default.
In other words, PHP can not use short tags such as?> must use <?php?>
Because the short mark is easy to use, and many programs also use a short mark to write, such as Discuz
If you do not change the Short_open_tag to on will appear the symptom will be difficult to judge is the above reason, here proposes modifies
Find
Short_open_tag = Off
To
Short_open_tag = On
5 whether to display errors Display_errors
For security reasons, some versions of display_errors also default to OFF.
That is, when debugging, if the PHP code is wrong, only a blank page appears. The cause of the error and the number of rows are not displayed.
This will be very inconvenient to debug, the proposal according to their own needs to modify
Find
Display_errors = off (note not;-display_errors = off [security])
Change into
Display_errors = On
6 Show notice Warning tips
The fifth step opens the error prompt, but the error report is also controlled by error_reporting.
PHP5 The default shutdown notice warning prompt, if it is in the local debugging, it is recommended to open notice warning prompt.
Find
error_reporting = E_all & ~e_notice
Change into
error_reporting = E_all
Another hint, in the program can also through the error_reporting () control error report output, specific how to use everyone to refer to the manual.
7 register_globals
It defaults to off for security reasons
When Register_globals=off, the next program should be received with $_post[' user_name ' and $_post[' User_pass ')
When Register_globals=on, the next program can accept values directly using $user_name and $user_pass.
For more detailed instructions please refer to
http://www.phpfans.net/bbs/archiver/?tid-234.htm
The suggestion changes according to oneself need. Here is not recommended, after all, there are security risks.
8 PHP5 jet lag problem
<?php echo Date ("y-m-d h:i:s");? > Time difference eight hours
Why, then? The PHP5 series has new time zone settings, the default is GMT, and China's East 8 area is exactly 8 hours
Find Date.timezone there's a line
;d Ate.timezone =
Remove, change
Date.timezone = PRC
of which Prc:people ' s Republic of China,
For more detailed solutions please refer to this forum's
http://www.phpfans.net/bbs/archiver/?tid-60.html
About the file upload to note the configuration please refer to this forum
http://www.phpfans.net/bbs/viewthread.php?tid=1663&extra=page%3D1
More Articles PHP enthusiasts stationhttp://www.phpfans.net
Apache Consolidated PHP
1 Open the Apache configuration document from the Start menu, as shown in
2 Modifying the site root directory
Find DocumentRoot there's a line
DocumentRoot "C:/Program Files/apache Software Foundation/apache2.2/htdocs"
This is the root of your site, you can modify it, or you can use the default. If you change, you have to modify the following, or you may have 403 errors
Find this should is changed to whatever your set DocumentRoot to
There are two lines under it
<directory "C:/Program files/apache Software Foundation/apache2.2/htdocs" >
Change the top two C:/Program Files/apache Group/apache2/htdocs to the directory you want.
3 Find DirectoryIndex index.html
Modified into
DirectoryIndex index.html Index.html.var index.php
So index.php can act as the default page.
4 Modular installation of PHP in Apache
Find # LoadModule Foo_module modules/mod_foo.so
Join a row after this row
LoadModule Php5_module C:/php5/php5apache2_2.dll
(where C:/php5/php5apache2_2.dll is the appropriate path for you to install PHP.)
Be careful not to confuse Php5apache2_2.dll,php5apache2.dll with Php5apache.dll. Php5apache.dll only applies to Apache version 1.
The Php5apache2.dll in the PHP5 compression package only applies to the apache2.0.* version, and if it is 2.2.* the above version, you must use Php5apache2_2.dll. Otherwise, it could happen.
"Cannot load C:/php/php5apache2.dll into server:the specified module could not is found."
Or:
"The requested operation has failed"
. The solution to this problem can be referred to in this forum
http://www.phpfans.net/bbs/viewt ... &extra=page%3d1
But after php5apache2_2.dll out, there is not much reference value.
5 Find AddType application/x-gzip. gz. tgz
Join a row after this row
AddType application/x-httpd-php. php
So Apache can explain PHP files.
The configuration is basically done here.
########Restart Apache. As shown, click Restart#########
Create a phpinfo.php file under the site root
<?php
Phpinfo ();
?>
Open in Browser
http://localhost/phpinfo.php
If the following information appears, PHP is already configured
Next Test the PHP and MySQL database association
Create a test.php file under the site root
[Copy to Clipboard]
CODE:
<?php
//php爱好者站 系列教程 [url]http://www.phpfans.net[/url]
$host = "localhost";
$user = "root";
$password = "12345";//12345改成你的mysql密码
$link=mysql_connect($host,$user,$password);
if(!$link) echo ";
else echo ";
mysql_close();
?>
Open http://localhost/test.php in Browser
If the output succeeds, it is done.
More Articles PHP enthusiasts stationhttp://www.phpfans.net
Install phpMyAdmin
Download get phpmyadmin-2.10.0.2-all-languages.zip, unzip it to your site root directory and rename it to phpMyAdmin,
Locate and open the libraries/config.default.php (some versions are config.inc.php or config.defaut.php in the current directory)
Make the following modifications:
1 Find password like the next two lines
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ';
Fill in your MySQL password to $cfg[' Servers ' [$i] [' password '] = '; Single quotes Inside
2 Search $cfg [' Pmaabsoluteuri '], set the value in the following single quotation mark to the phpMyAdmin directory path, such as:http://localhost/phpMyAdmin/;
3 Search $cfg [' Defaultlang '], set the value in the following single quotation mark to zh-gb2312;
This is modified according to the code you want (if the database code is not very familiar with the recommendations do not modify)
4 Search $cfg [' Defaultcharset '] and set it to the encoding you want.
Open the browser and enter:http://localhost/phpMyAdmin/, Apache and MySQL are all started,
If the following page appears, the phpMyAdmin installation is complete and you can use the
phpMyAdmin the specific function, please slowly familiar, here no longer repeat.