How do I install the PHP development environment? PHP Environment Installation Configuration

Source: Internet
Author: User
Tags apache php curl php file php and php development environment svn mysql database

Build PHP's development environment
Time: 8.1 Days
Requirements:

Manual installation of the PHP environment (integration environment is not counted, only Winow, Linux for reference, but Linux can also be out under the title).
Including Mysql+php+apache+phpadmin, the version is not limited. Requires the ability to conduct Web tests.
Install the development IDE, including (Zend 5+ editplus+emeditor+dreamweaver)
Manual:
http://www.php.net/manual/zh/install.windows.php
http://www.php.net/manual/zh/install.windows.apache2.php
http://www.php.net/manual/zh/install.windows.extensions.php


Reference content:
http://www.php.net/manual/zh/install.unix.php
http://www.php.net/manual/zh/install.pecl.php

Attention content: Phpinfo, installation success is not successful, mainly look at this!

======================================

1, Apache, MySQL, PHP installation in the order of Windows
A: Apache, MySQL to install in front of PHP, Apache and MySQL installation in a random order

2, opened the Php_curl expansion, why will not be prompted to open the Curl service, how to solve?
A: The PHP directory in the Libeay32.dll, Ssleay32.dll, Php5ts.dll, php_curl.dll files to the system32 directory, restart Apache

3, in Windows to make PHP work in the apache2.x of the three ways?
Answer: Handler, CGI, fastcgi

Note: General module installed as handler

========================================

1, when the configuration good Apache PHP in the browser after the input http://localhost page does not correspond because no default page is configured DirectoryIndex

2, download the PHP package will have such problems in the download of the PHP package does not php5apache2_2.dll expansion, because the download package has two

3, Apache PHP configuration will generally add two words
LoadModule Php5_module E:/php/php-5.2.10/php5apache2_2.dll #PHP目录
AddType application/x-httpd-php. PHP #执行php的文件类型
But always sometimes the reason for the error to see the addition of two paragraphs have more than space, x-httpd-php behind the space

==============================================

1.windows installation Environment, PHP combined with Apache configuration, modify the PHP and Apache configuration files, restart Apache, appear "The requested operation has failed" How to solve?
A: The above error, can not determine which problem, you may use the Doc command to find the cause of the error, first need to enter the directory of Apache, and then typing command: httpd.exe-w-n "Apache2.2"-K Start
Here is a detailed description of the information.
Note: To ensure that the PHP directory under the Php5_apache2_2.dll file exists;
When configuring Apache, be aware of introducing this file and assigning it to the correct directory;
When editing Apache configuration, pay attention to the space problem, if there are extra spaces, may cause errors;

Annotation: Feel your asking you are PHP and Apache did not establish contact, not clear

2.windows Install the Php+apache+mysql development environment, how to configure the server to handle only get and post requests?
A: Configure the Apache configuration file as follows:
<limitexcept Get post>
Deny from all
</LimitExcept>

Annotation: This is not found.

3.MYQL installation completed, there is no "Start service", this is why?
For:

<1. Appeared in the previous installation of MySQL server, the solution, the first to ensure that the previous installation of the MySQL server completely uninstall off;
<2. Check to see if the previous password has been modified or not, if it has been reset, and if the password has been set before, the password may be changed here, please leave it blank, and remove the "Modify security Settings" Check before the installation configuration is complete and then modify the password separately. ;
<3. The MySQL installation directory under the Data folder Backup, and then deleted, after the installation is completed, will install the generated Data folder Delete, backup of the data folder to move back, and then restart the MySQL service can be, in this case, you may need to put before the database backup;

Annotation: I don't know if it's right, it sounds like you've already installed MySQL, but it's going to clash if you install one.

==========================================

1, add debug code
Create a debug.php file. The inside can add $_get,$_post equivalent. Then set it in php.ini: include_path = "c:/php" and place debug.php in this folder.
If you want to add a public kinsoku file, you can:
Find automatically add files before or after any PHP document in the INI.

Auto_prepend_file = auto_prepend_file.php; Attached to the head
Auto_append_file = auto_append_file.php; Attached to the tail

2, how to make the string in html/php format not interpreted, but as shown
Example:
PHP ";

The code is as follows Copy Code
Echo "was explained:". $str. " After the treatment of: ";
Echo htmlentities (NL2BR ($STR)); Two times after conversion output.
?>

3, how to configure the GD library
1: Copy all DLL files in the DLLs folder to the System32 directory C:windowssystem32
2: Open php.ini
Set extension_dir = "c:/php/extensions/";
3:extension=php_gd2.dll: Remove the comma before extension, and if there is no php_gd2.dll,php_gd.dll, make sure that the file exists C:/php/extensions/php_ Gd2.dll

Note: The general use of environment variables, do not need to DLLs folder test to C:windowssystem32

=================================================== Berkelium Game

1, is it possible to use if to determine whether $_post global variables have passed over parameters?
A: It is recommended to use Isset (), if is a judgment statement, the variables inside must have been defined, so cannot use if.
Annotation: A global variable, also called an external variable, is a variable defined outside the function.

Note: the Isset () determines whether the variable has a declaration and then judges the other. If lazy, you can use empty ()

$_post is a global variable, which means it is already defined, so it can be used

2,form What content is submitted when the form is submitted?
A: At the time of submission, the name and Value property of the label is submitted, where name is the key value, value is the array element, and if the label has no Name attribute, it is not committed.

Annotation: I don't know what your submission means, but I know that if there is a submission address, he will find the address, and the value after the submission is empty. Is that what it means?

Note: When the form is submitted, if it is get, it is got, if it is post, there is a difference in encoding! You can pay attention! In addition, some of the most obvious name, but no value, with isset () can not be true.


3, what is a conversation?
A: When a user visits a Web site, it will establish a session, communicate with the server, when all the pages of the entire site are closed, the session is over, sessions are also released.

Annotation: As far as web development is concerned, a conversation is a call between the browser and the server, but this is done in a browser-browsing way.

This is my Baidu, do not know right no, I do not understand. But it looks like that, Tom.

Note: The session is a conversation maintained between the browser and the server, and the session is not global, it is the user's global level. In general, this will be the browser lifecycle, browser shutdown, session end! Of course this can also be configured. See the session section in PHP.ini. When you open a new window, you will start a new session, but you will not be able to generate a newer session (measurable) If you open the window from an old window.

=======================================================

1. LAN two machines Apache can visit each other
OK
Modifying the httpd.conf configuration is OK.
Add IP is 192.168.0.1 (this is a LAN intranet IP)
Modify the configuration of listen to
Listen 192.168.0.1:80 and then restart Apache.
In addition: first, the firewall of the server to shut down, if you are using XP system, the system with the firewall must be closed.
Second, configuration issues

The code is as follows Copy Code
<directory "C:/apache2.2/htdocs" >
Order Allow,deny
Allow from all
</Directory>

Annotation: 1. Add IP is 192.168.0.1 (this is a LAN intranet IP) this should be in the windowssystem32driversetchosts add it?

Tom Note: The domain name configuration is only the domain name to which IP, but access, will also be anti-host name with the past!

The server needs to configure the virtual host to monitor this IP, according to the host name set streaming, to access.

2. Why to modify the configuration of this listen

Note: Indicates which port the server listens to

2.php Extension Library Out of ext There are other things? For example, to connect to the database outside MySQL DLL, where to find?
There are many extensions, such as curl, that you can write on your own. Php_dba.dll and Php_oci8.dll should be PHP's own, commonly used in the php/ext.

Note: The DLL library under window, in addition to its own, others need to be external or from the compiler DLL. The manual has a way to compile it.

3.php How to release a complete website project (Windows/linux/unix), directly placed in the WWW directory on it?
Answer (online check)
A. Code Warehouse Direct Publishing
SVN export on the server ....
B. If there are many servers,
(1) SVN export on a single publisher ...
(2) then to other server push, rsync ....

Annotation: Can't read

Note: As long as you can send on the line.
=======================================================

1, Apache, MySQL, PHP in the process of Windows
A: First install Apache or MySQL database, two installed successfully after the final installation of PHP

2. After the installation completes the local link on-line project, because the database link uses PDO, how opens the PDO expansion?
A: Copy the Php_pdo.dll file in the PHP directory to the system32 directory, then open the php.ini, find extension=php_pdo.dll; Remove the semicolon from the front of the extension

3. How to locally customize domain name access to local projects, such as building a local substation project
A: Link customization, for example, define access address: bendi.homelink.com.cn, Open Directory: c:windowssystem32driversetc, find Hosts file and open, add 127.0.0.1 at last line bendi.homelink.com.cn, close Save!
Then open httpd.conf for editing and add:

The code is as follows Copy Code
Namevirtualhost *:80
<virtualhost *:80>
ServerAdmin e-mail address
DocumentRoot Project Storage Path
ServerName bendi.homelink.com.cn
</VirtualHost>

After the join save shutdown, then restart Apache and browser can be directly to the custom domain to access the

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.