Preparation of EclipsePHP environment

Source: Internet
Author: User
For the EclipsePHP environment setup, refer to the book PHP and MySqlWeb development and related network resources to build the EclipsePHP development environment. preparations: Download Apachehttp: // httpd.apache.org /?? The suffix is msi ????????????? Download the PHP installation file? Ht Eclipse PHP environment construction

I have built an Eclipse PHP development environment with reference to PHP and MySql Web development and related network resources.

Preparation: Download Apache http://httpd.apache.org /?? Suffix: msi

????????????? Download the PHP installation file? Http://windows.php.net/download? Installer

??????????? Download Eclipse PHP

?? Apache and PHP are installed by default. Apache is installed first during the installation process, and then the PHP installer is installed, which will be httpd under the conf directory in Apache. conf file and PHP directory. the INI file is automatically configured, and we do not need to make any modifications.

The automatically modified content should be:

Php. ini file

? 1) extension_dir = "./"??? Change to extension_dir = "C:/php-5.2.6/ext"
? 2); extension = php_mysql.dll "and"; extension = php_gd2.dll ", remove the semicolon above, and change extension = php_mysql.dll to extension = php_mysql.dll.
Change; extension = php_gd2.dll to extension = php_gd2.dll
? 3) save php. ini and restart apache.

2. modify httpd. conf in Apache/conf and add the following content at the end of the file:

LoadModule php5_module "C:/php-5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Action application/x-httpd-php "/php/php-cgi.exe"
AddType application/x-httpd-php. html
AddType application/x-httpd-php. htm
Adddefacharcharset UTF8

PHPIniDir "C:/php-5.2.6"

?

We need to add:

C: \ php-5.2.6; C: \ php-5.2.6 \ ext

?

After the above configuration, create a php test file index. php in the Apache/htdocs directory as follows:

? Phpinfo ();
?>

Remember to restart Apache.

Open IE and enter http: // 127.0.0.1/index. php in the address bar. if it works, php and apache will work.

?

Install the debugging environment XDebugger:

Download the XDebugger file, which is a Dll and put it in the Ext directory of PHP. add the following content at the end of the PHP. ini file:

; Onload Xdebug; load Xdebug

Zend_extension_ts = "D:/Program Files/PHP/ext/php_xdebug-2.1.2-5.3-vc6-nts.dll"
; Xdebug configuration

[Xdebug]
; Enable automatic tracking
Xdebug. auto_trace = On
; Enable exception tracking
Xdebug. show_exception_trace = On
; Enable automatic start of remote debugging
Xdebug. remote_autostart = On
; Enable remote debugging
Xdebug. remote_enable = On
; Collect variables
Xdebug. collect_vars = On
; Collect return values
Xdebug. collect_return = On
; Collect parameters
Xdebug. collect_params = On

?

?

For example, if I place all Eclipse projects under E: \ EclipseWorkspace, modify Apache/conf/httpd. conf and add the following at the end of the file:

DocumentRoot "D:/PHPWorkSpace"
### Alias/Workspace? "D:/PHPWorkSpace"

?? Options Indexes MultiViews
?? AllowOverride None
?? Order allow, deny
?? Allow from all

?

The advantage of doing so is that all php projects share an apache configuration (see how to set it below ).

?

?

Pear installation:

?
?
?
?
?
?
?
?
?
?
?
?
?
?
?

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.