Build a PHP Development Environment (Apache, PHP, zendoptimizer, MySQL, and Zend) in Windows 7)

Source: Internet
Author: User
Tags php development environment root access

I am also a newbie

1. install Apache

Apache_2.2.14-win32-x86-no_ssl.msi
2. install PHP
(1) PHP-5.2.6-win32-installer.msi
(2)php-5.2.6-win32.zip, decompress and replace all the files in the install PHP Directory
Windows extensions
; Note that ODBC support is built in, so no DLL is needed for it.
; Note that your DLL files are located in the extensions/(PHP 4) EXT/(PHP 5)
; Extension folders as well as the separate pecl dll download (PHP 5 ).
; Be sure to appropriately set the extension_dir directive.

; Extension = php_bz2.dll
; Extension = php_curl.dll
; Extension = php_dba.dll
; Extension = php_dbase.dll
; Extension = php_exif.dll
; Extension = php_fdf.dll
Extension = php_gd2.dll
; Extension = php_gettext.dll
; Extension = php_gmp.dll
; Extension = php_ifx.dll
; Extension = php_imap.dll
; Extension = php_interbase.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_msql.dll
; Extension = php_mssql.dll
Extension = php_mysql.dll
; Extension = php_mysqli.dll
; Extension = php_oci8.dll
; Extension = php_openssl.dll
; Extension = php_pdo.dll
; Extension = php_pdo_firebird.dll
; Extension = php_pdo_mssql.dll
; Extension = php_pdo_mysql.dll
; Extension = php_pdo_oci.dll
; Extension = php_pdo_oci8.dll
; Extension = php_pdo_odbc.dll
; Extension = php_pdo_pgsql.dll
; Extension = php_pdo_sqlite.dll
; Extension = php_pgsql.dll
; Extension = php_pspell.dll
; Extension = php_shmop.dll
; Extension = php_snmp.dll
; Extension = php_soap.dll
; Extension = php_sockets.dll
; Extension = php_sqlite.dll
; Extension = php_sybase_ct.dll
; Extension = php_tidy.dll
; Extension = php_xmlrpc.dll
; Extension = php_cmd.dll
; Extension = php_zip.dll
3. Install MySQL
(1) mysqlv5.1.42forwindows32bit. MSI

1). There are three options: "typical (default)", "complete (complete)", and "Custom (custom)". Select "Custom ".

 

2 ). click "Developer components (developer part)" and select "this feature, and all subfeatures, will be installed on local hard drive. ", that is," This part and its sub-parts are all installed on the local hard disk ". The preceding operations include "MySQL Server", "client programs (MYSQL client program)", and "documentation (document)" to ensure that all files are installed. Click "change..." and manually specify the installation directory. Modify the MySQL server path and data path

 

3) Check "configure the MySQL server now" and click "finish" to finish the software installation and start the MySQL Configuration Wizard.

 

4) Select the configuration method, "detailed configuration (manual precise configuration)", and "standard configuration". Select "detailed configuration" to familiarize yourself with the configuration process.

 

5 ). select the server type, "Developer machine (development and testing class, MySQL occupies a small amount of resources)", "server machine (server type, MySQL occupies a large amount of resources) "," dedicated MySQL server machine (dedicated database server, MySQL occupies all available resources) ", you choose according to your own type, generally choose" server machine ", not too little, it will not be full.

 

6 ). select the general purpose of the MySQL database, "multifunctional database (Universal multi-function type, good)", "transactional database only (server type, dedicated to transaction processing, General) "," non-transactional database only (non-transaction processing type, relatively simple, mainly used for monitoring and recording, the support for MyISAM data types is limited to non-transactional ), select as needed. Here I select "transactional database only" and press "Next" to continue.

 

7 ). configure InnoDB tablespace to select a bucket for the InnoDB database file. If you modify the bucket, remember the location and select the same place for the reinstallation. Otherwise, the database may be damaged, of course, it is okay to back up the database. We will not detail it here. I have not modified it here. Use the default position and press "Next" to continue.

 

8 ). select the average MySQL access volume of your website and the number of connections at the same time. For example, "demo-support (DSS)/OLAP (about 20 connections)" and "online transaction processing (OLTP) (about 500) "and" manual setting (manually set, enter a number by yourself) ". Here I select" online transaction processing (OLTP) "and my server, enough. Press "Next" to continue.

 

9 ). whether to enable the TCP/IP connection and set the port. If the port is not enabled, you can only access the MySQL database on your machine. I enable it here and tick the port number: 3306. Press "Next" to continue

 

10). This is important because utf8 encoding is selected for the default MySQL database language encoding, and "Next" continues.

 

11 ). this step asks if you want to change the default root user (Super Management) password (blank by default). If you want to change the "New Root Password", enter the new password here (if re-installed, you have already set a password. Changing the password may cause errors. leave it blank and remove the check box before "modify Security Settings". After the installation and configuration are complete, change the password separately ), "Confirm (re-enter)" is entered again to prevent errors. "Enable root access from remote machines (whether to allow root users to log on to other machines. If you want security, do not check it. If you want convenience, check it )". Finally, "Create an anonymous account (create an anonymous user, and the anonymous user can connect to the database, and cannot operate data, including queries)" is not checked. The settings are complete, press "Next" to continue.

 

12) Confirm that the settings are correct. If there is an error, press "back" to return the check. Press execute to make the settings take effect.

 

13 ). this is a combination of Apache and PHP. I have mentioned it before. Here I will talk about it. In the PHP installation directory, find the PHP that was previously renamed and edited. INI, as shown in ln563, remove ";" before "; Extension = php_mysql.dll" and load the MySQL module. Save and shut down. Restart Apache. You can also select other modules to be loaded and remove the previous ";", which indicates that the module is to be loaded. The more loaded, the more resources occupied, however, there is not much to do. All the module files are placed under the "Ext" of the PHP decompression directory. Here I load all the modules that can be loaded, and the previous ";" is not removed, this module is not found in the "Ext" directory by default. An error occurs when the file cannot be found during loading. This is just a reference. Generally, you do not need to load so much data. You can load the data as needed. Save the edited data and close it.

  

14 ). similarly, after the module is loaded, it is necessary to specify the module location. Otherwise, the error "the specified module cannot be found" will be prompted when Apache is restarted. Here is the simplest method, directly specify the PHP installation path and the ext path in it to the Windows System Path-right-click "computer", select "properties", and select the "advanced system settings" tab, click "environment variables", find the "path" variable under "system variation", select, double-click or click "edit", and set "; C: \ PHP; C: \ PHP \ Ext "is added after the original value. Of course,"; C: \ PHP "is my installation directory. You need to change it to your PHP installation directory, confirm all. After the system path is added, it takes effect after the computer is restarted. You can restart the system now, or restart the system after all software is installed or configured.

(2) sqlyog enterprise v6.56 English version
I will not talk about it here.
4. Install zenddebugger
Unzip the ZendDebugger-5.2.14-cygwin_nt-i386.zip to the PHP installation directory, that is, "C: \ PHP", and then change the name of the ZendDebugger-5.2.14RC9-cygwin_nt-i386 folder to a short file name such as zenddebugger to the zenddebugger directory. Copy dummy. php to the website root directory, change the folder 5_2_x_comp to the php-5.2.x, and copy zenddebugger. DLL to PHP installation directory c: \ PHP.
5. Install zendoptimizer
ZendOptimizer-3.3.0a-Windows-i386.zip
[Zendoptimizer] zendchina official: zendoptimizer uses code optimization methods to speed up PHP application execution. The principle of implementation is to optimize the code generated by the run-time compiler before it is finally executed. Generally, the execution of a PHP program using Zend optimizer is 40% to 100% faster than that without Zend optimizer. This means that the visitor of the website can browse the webpage faster, so as to complete more transactions and create better customer satisfaction.
Faster response also means saving hardware investment and enhancing the services provided by the website. Therefore, using Zend optimizer improves the profitability of e-commerce. Zend optimizer can bring many benefits to PhP users, especially those who operate websites. Quick running of the PHP program can significantly reduce the server's CPU load and reduce the response time by half, that is, the time between the visitor clicking the link to the server and reading the page.
 
6. Modify PHP. ini
In:
[Zend]
Zend_extension_manager.optimizer_ts = "C: \ PHP \ zendoptimizer \ Lib \ Optimizer-3.3.0"
Zend_extension_ts = "C: \ PHP \ zendoptimizer \ Lib \ zendextensionmanager. dll"
Append:
; Zend_extension_ts = "C: \ PHP \ zenddebugger \ 5_2_x_comp \ zenddebugger. dll"
Zend_extension_manager.debug_server_ts = "C: \ PHP \ zenddebugger"
Zend_debugger.allow_hosts = 127.0.0.1/32,192.168 .0.55/24
Zend_debugger.expose_remotely = always
 
The final result should be
[Zend]
Zend_extension_manager.optimizer_ts = "C: \ PHP \ zendoptimizer \ Lib \ Optimizer-3.3.0"
Zend_extension_ts = "C: \ PHP \ zendoptimizer \ Lib \ zendextensionmanager. dll"

; Zend_extension_ts = "C: \ PHP \ zenddebugger \ 5_2_x_comp \ zenddebugger. dll"
Zend_extension_manager.debug_server_ts = "C: \ PHP \ zenddebugger"
Zend_debugger.allow_hosts = 127.0.0.1/32,192.168 .0.55/24
Zend_debugger.expose_remotely = always
 
Explanations:
 
(1); zend_extension_ts = "C: \ PHP \ zenddebugger \ 5_2_x_comp \ zenddebugger. dll" I noted this because zend_extension_ts is set to be repeated and cannot coexist with zendoptimizer.
 
(2) zend_extension_manager.debug_server_ts = "D: \ soft \ PHP \ zenddebugger", which indicates the directory, PHP will automatically find the DLL file under the folder php_x_x_x according to its own version. This is why we renamed the subdirectory under zenddebugger.
 
(3) zend_debugger.allow_hosts = 127.0.0.1/32,192.168 .0.55/24. Change 192.168.0.55 to your own IP address.
 
 
7. Install ZendStudio-7.1.0.
Pay attention to the plug-in. Next is OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.