03 Time to read a PHP book, then still PhP3, looking back four years PHP in the web opened the prospect is really bright ah! Three years of missing PHP is going to see the php5, and now I really from writing the first PHP Web start from today or three or four months, with the work is done www.kuomart.com Web site to write, recall that the original has been used is windows2003+iis6+ php5.0.7+mysql4.1 in the development, until yesterday the machine heavy Trojan, Kav also did not find out why, oneself find also no suspicious exposure point, so simply re-installed a bit XP, because TV1000 TV card only in XP into normal operation, The previous configuration was successful in the 2003 system, but there was a hardware error on the screen. So just put 2003 under the Web development of my Development Environment section is also installed under XP part. Want to install the lamp environment, but considering the machine on the data too much, the operation of trouble, and so rich to buy a hard drive or all that day on impulse to say it. So today at noon began to configure the environment!
To http://www.apache.org download the latest version of the Apache apache.2.24, after installation did not find service, originally I chose only the second item, select this need to manually add Windows services! Baidu a bit to understand, so if you are the first time to install the next do not go into the ground set what unnecessary settings, run will be ok!
The next step is to install PHP, I started to install the php5.0.4,4, install PHP I will not say more, the following will be the information I found posted. Then is the Apache support PHP configuration, of course, modified httpd.conf, but I
Open C:\Program Files\apache software foundation\apache2.2\conf\httpd.conf This file with Notepad to modify:
① found:
AddType application/x-gzip. gz. tgz
Add the following lines below:
AddType application/x-httpd-php. php
AddType application/x-httpd-php. PhP4
AddType application/x-httpd-php. php3
AddType application/x-httpd-php. phtml
AddType Application/x-httpd-php-source. Phps
AddType Image/x-icon. ico
② found:
#LoadModule Ssl_module modules/mod_ssl.so
Add a line below:
LoadModule Php5_module C:\php5\php5apache2_2.dll
(Special note: If your Apache version is 1.x, this should be: LoadModule php5_module C:\php5\ Php5apache.dll; If your Apache version is 2.0.x-2.2.x, here should be: LoadModule php5_module C:\php5\php5apache2.dll, I took a lot of trouble here to find this! )
③ found:
DirectoryIndex index.php ...
This line, you can modify this, add the default file name:
DirectoryIndex index.php default.php index.htm index.html default.htm default.html
The LoadModule php5_module C:\php5\php5apache2_2.dll, and the sentence appears.
Requested error
Of course this situation is usually Baidu or Google, the original is a variety of issues between the version, I think it should be, find the corresponding configuration information as follows:
One. Download the latest apache2.24,mysql5.2,php5.2.1[download address: http://cn.php.net/downloads.php Note: Download Php-5.2.1-win32 and Pecl-5.2.1-win32 (expansion pack) at the same time, the format is the kind of decompression, not EXE or MSI, such as the kind of direct installation. ] (please use Baidu's own search for specific address).
Two. Installation Configuration PHP5.2.1
1. Unzip the PHP5.2.1 compressed package to C:\PHP5 (this path and file name can be arbitrary, but if you use this path and file name, if you do not use the path and file name, make the appropriate changes).
2. Copy the following files in the C:\PHP5 directory to the Windows System folder, the folders are different depending on the version of Windows (if windows9x/me, it is c:\windows\syste; if it is Windows nt/ 2000, or C:\Winnt\System32, or c:\windows\system32 if it is Windows xp/server2003. where \ c is the system disk of the operating system you are using now, if your current operating system is not installed under C:\windows, please make changes accordingly.
Php5ts.dll
Fdftk.dll
Fribidi.dll
Gds32.dll
Libeay32.dll
Libmcrypt.dll
Libmhash.dll
Libmysql.dll
Libswish-e.dll
Msql.dll
Ntwdblib.dll
Ssleay32.dll
Yaz.dll
3. Rename the file Php.ini-dist in the C:\PHP5 directory to php.ini (the profile automatically adds "//" to all additions, adding security and increasing the hassle If you rename php.ini-recommended to PHP.ini, the profile does not add "//" to the added content, which reduces security, but is more convenient. Choose which one you decide), copy php.ini to C:\windows\ (xp/2003/9x/me) or C:\Winnt\ (2000/NT), open with Notepad, and make the following changes:
① search extension_dir=./This line and point its path to the extensions directory in your PHP directory, modified to: Extension_dir = C:\PHP5\ext
② If you want to support more modules, please take the following to do, if you do not want to, directly save the php.ini file.
PHP supports a lot of modules, but some DLLs are not free, so there is no PHP package with the release, but the DLLs folder is very much, just now we have copied them to the System32 folder, and now we test to see how many modules it supports. The following is the results of my test, only for reference, if the installation is complete, pop-up does not support the Xxx.dll module, the front semicolon plus go directly. Search:
; 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, the following is the result of my test, generally as follows to remove the comment after the problem:
Extension=php_bz2.dll
Extension=php_cpdf.dll
Extension=php_crack.dll
Extension=php_curl.dll
Extension=php_db.dll
Extension=php_dba.dll
Extension=php_dbase.dll
Extension=php_dbx.dll
Extension=php_domxml.dll
Extension=php_exif.dll
Extension=php_fdf.dll
Extension=php_filepro.dll
Extension=php_gd2.dll
Extension=php_gettext.dll
Extension=php_hyperwave.dll
Extension=php_iconv.dll
; Extension=php_ifx.dll
; Extension=php_iisfunc.dll
Extension=php_imap.dll
Extension=php_interbase.dll
Extension=php_java.dll
Extension=php_ldap.dll
Extension=php_mbstring.dll
; Extension=php_mcrypt.dll
Extension=php_mhash.dll
Extension=php_mime_magic.dll
Extension=php_ming.dll
Extension=php_mssql.dll
Extension=php_msql.dll
; Extension=php_oci8.dll
Extension=php_openssl.dll
; Extension=php_oracle.dll
Extension=php_pdf.dll
Extension=php_pgsql.dll
; Extension=php_printer.dll
Extension=php_shmop.dll
Extension=php_snmp.dll
Extension=php_sockets.dll
; Extension=php_sybase_ct.dll
Extension=php_w32api.dll
Extension=php_xmlrpc.dll
Extension=php_xslt.dll
Extension=php_yaz.dll
Extension=php_zip.dll
After the modification is complete, save the php.ini.
③ Unzip the Pecl-5.2.1-win32.rar package and copy all of the files to the C:\PHP5\ext folder. (This folder is the extension file of PHP5.2.1, if you use C language to compile the PHP extension, you can also put in the folder)
④ Create a new folder under the C:\PHP5 directory named: Session. (this folder is used to save the session because PHP does not have a long memory-based variable like application in ASP, so the session is almost the only option for saving initial query conditions for page flipping, or for shopping carts.) However, the folder will need to be cleaned regularly later.
This completes the installation and configuration of PHP.
Three. Installation of MySQL
MySQL is relatively independent, the database is small, can not directly operate it, not like access or SQL2000 as a graphical management tool, but there are many graphical management software can be very good to operate it, such as: EMS SQL Manager 2005 For MySQL (highly recommend the best MySQL management software), NAVICAT,PHPMYADMIN,MYSQLCC. These software can be downloaded to the Internet, not described in detail here.
1. After downloading the MySQL for Win32 installation package, open with WinZip, run Setup.exe directly, it is important to choose an installation path, of course, the installation path can be arbitrary, but it is recommended to install it with PHP, select the C:\MySQL directory.
2. After the installation is complete, MySQL automatically enters the setup stage. Configure by default, enter the password, and complete the setup. (The default user name is root and the password is empty)
3. After the general load MySQL will automatically start the service, if not started, please double-click C:\MySQL\bin\mysqld-nt.exe Run.
4. If you have downloaded the above mentioned management software, you can use them for MySQL management.
Four. Configuration of IIS (with the fifth choice)
Open IIS, right-click on the "Default Web site" To open the properties, make the settings in the home directory, note the steps:
After the completion of the IIS+PHP+MYSQL environment is established.
Five. Apache installation configuration (with the fourth choice)
If you do not have IIS installed, then please install Apache this small and powerful Web server, installation directory recommendations and PHP directory consistent, select C: \. The system default installation directory is C:\Program Files:
1. Download Apache2.2.4 for Win32. MSI installation file, directly double-clicking it will automatically perform Apache installation.
2. During the installation process, follow the prompts, enter localhost from top to bottom, the remaining two blank lines enter your name and email address (whatever you want) to complete the installation configuration.
After installation, the Apache icon will appear in the system tray in the lower right corner of the desktop, double-click to open Apache Control Panel, you can stop or restart the server.
Configuration of the 3.apache2.2.4
Open C:\Program Files\apache software foundation\apache2.2\conf\httpd.conf This file with Notepad to modify:
① found:
AddType application/x-gzip. gz. tgz
Add the following lines below:
AddType application/x-httpd-php. php
AddType application/x-httpd-php. PhP4
AddType application/x-httpd-php. php3
AddType application/x-httpd-php. phtml
AddType Application/x-httpd-php-source. Phps
AddType Image/x-icon. ico
② found:
#LoadModule Ssl_module modules/mod_ssl.so
Add a line below:
LoadModule Php5_module C:\php5\php5apache2_2.dll
(Special note: If your Apache version is 1.x, this should be: LoadModule php5_module C:\php5\ Php5apache.dll; If your Apache version is 2.0.x-2.2.x, here should be: LoadModule php5_module C:\php5\php5apache2.dll, I took a lot of trouble here to find this! )
③ found:
DirectoryIndex index.php ...
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. The environment for this PHP has been fully established.
Six. Zend Optimizer installation configuration (optional)
Download comes after is an. exe file, directly installed on it, the installation process to choose the PHP version, you must choose the exact, here I choose php5.2.1, complete the installation before the prompt to backup php.ini, click OK after the end of the installation.
Open PHP.ini, modify a place:
Found it:
[Zend]
The following can be seen:
zend_optimizer.optimization_level=*
This line, change the value of "=" to 1023, that is, change the line to:
zend_optimizer.optimization_level=1023
After saving, restart the Apache/iis to complete the installation.
Seven. Testing
Create a new file with Notepad and write the following lines:
Phpinfo ();
?>
Rename the file to phpinfo.php, save it to the C:\Apache software Foundation\apache2.2\htdocs directory (the directory is your site root), and then enter http://localhost/phpinfo.php in the browser.
If you can see the relevant PHP information, it will prove that the entire Windows iis6/apache2.2.4+mysql5.2+php5.2.1 environment installation and configuration work successfully completed!
http://www.bkjia.com/PHPjc/318334.html www.bkjia.com true http://www.bkjia.com/PHPjc/318334.html techarticle 03 years When you read a PHP book, then still PhP3, looking back on the four years of PHP in the web opened the foreground is really a bright ah! Three years of missing PHP is going to see the php5, now count ...