


How to install PHP development environment? PHP environment installation configuration_PHP tutorial
How to install the PHP development environment? This may be a troublesome thing for PHP beginners. He needs to install php, mysql, apache or php mysql iis. The editor will introduce the first method below.
Build a PHP development environment
Time: 8.1
Requirements:
Manually install the php environment (the integrated environment does not count, only winow is enough, linux is used as a reference, but the question can also be asked under linux).
Including mysql+php+apache+phpadmin, the version is not limited. It is required to be able to perform web testing.
Install 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
Follow content: phpinfo, whether the installation is successful or not, mainly depends on this!
======================================
1. Installation sequence of apache, mysql, php under windows
Answer: apache and mysql must be installed before php. The installation order of apache and mysql is arbitrary
2. After the php_curl extension is enabled, why is it prompted that the curl service is not enabled? How to solve it?
Answer: After moving the libeay32.dll, ssleay32.dll, php5ts.dll, php_curl.dll files in the PHP directory to the system32 directory, restart apache
3. Three ways to make php work in apache2.x under windows?
Answer: handler, cgi, fastcgi
Note: Generally, the module is installed as handler
========================================
1. After configuring apache php, enter http://localhost on the browser. The page does not respond because the default page DirectoryIndex is not configured
2. There will be such a problem when downloading the PHP package. There is no php5apache2_2.dll extension in the downloaded PHP package. This is because there are two types when downloading the package
3. Two sentences are usually added when configuring apache PHP
LoadModule php5_module E:/PHP/php-5.2.10/php5apache2_2.dll #PHP Directory
AddType application/x-httpd-php .php #File type for executing php
But sometimes an error will be reported. The reason is to see if there are more spaces in the two paragraphs added. There are spaces after x-httpd-php
==============================================
1. When installing the environment under Windows, when php and apache are combined and configured, the configuration files of php and apache are modified, and apache is restarted. How to solve the problem of "the requested operation has failed"?
Answer: When the above error occurs, it is impossible to determine which one is the problem. You can use the doc command to find out the cause of the error. First, you need to enter the directory where apache is located, and then type the command: httpd.exe -w -n "Apache2.2" -k start
Detailed information will be provided below.
Note: Make sure the php5_apache2_2.dll file exists under the php directory;
When configuring apache, be sure to introduce this file and specify it in the correct directory;
Pay attention to the space problem when editing the apache configuration. If there are extra spaces, it may cause errors;
Annotation: I feel like your question is that there is no connection between php and apache at all, so it’s not very clear
2. How to configure the server to only handle get and post requests when installing the php+apache+mysql development environment under windows?
Answer: The configuration file for configuring apache is as follows:
Deny from all
Annotation: This one was not found
3. Myql installation is completed, but "Start service" cannot be displayed. Why is this?
Answer:
<1. It appears on a server where mysql was previously installed. The solution is to first ensure that the previously installed mysql server is completely uninstalled;
<2. Check whether the previous password has been modified as mentioned in the step above. If it is a reinstallation and a password has been set before, it may be wrong to change the password here. Please leave it blank and change "Modify Security Settings" Remove the previous check mark and change the password after the installation and configuration are completed;
<3. Back up the data folder in the mysql installation directory, and then delete it. After the installation is completed, delete the data folder generated by the installation, move the backed up data folder back, and then restart the mysql service. This way In some cases, you may need to back up the previous database;
Comment: I don’t know if this is correct, it sounds like mysql has already been installed, but installing another one will cause conflicts
==========================================
1, add debugging code
Create a debug.php file. You can add $_GET, $_POST and other values inside. Then set: include_path = "c:/php" in php.ini and put debug.php in this folder.
If you want to add public header and tail files, you can do the same:
Find in ini Automatically add files before or after any PHP document.
auto_prepend_file = auto_prepend_file.php; //Attach to the head
auto_append_file = auto_append_file.php; //Attach to the tail
2. How to prevent the string in Html/PHP format from being interpreted, but displayed as it is
Example:
PHP";
The code is as follows | Copy code | ||||||||||||||||||||
Echo "Explained: ".$ str."Processed:";
|