php5+apache2.2 Configuring _php Tutorials

Source: Internet
Author: User
Tags configuration php
Because of the version update, these files have a new name: I used 5.4.
Php.ini-production corresponds to php.ini-recommended
Php.ini-development corresponds to Php.ini-dist
The other steps are still the same, the configuration file is still to be modified, such as the path and so on. And if you can't find libmysql.dll this file, download one and remember to use a similar version of PHP. I use the PHP5.4 to provide a download.

PS: My configuration is not a problem, in connection with the database problems, the general prompt expansion did not install .... In fact, PHP configuration file (on the modified php.ini file in the window, do not put in the System32 file, my test, do not need to libmysql.dll this file, just put Php5ts.dll in System32. In the E:php/ext file there are (Php_mysql.dll and Php_mysqli.dll) enough. Connect to the database no problem)


php5+apache2.2 Configuration Success Stories:
First, install and configure Apache (in my case, install to E:\Program files\apache software foundation\apache2.2)
1, install the default installation, Network Domain, Server name I fill in My Computer name, Administrator ' s email address area fill your email addresses
2, after installation in the installation directory has a conf folder, open the httpd.conf file for configuration
• Locate the DocumentRoot and set it as the folder where you want to store the PHP, HTM and other Web files, such as "E:\Program Files\apache software Foundation\apache2.2\htdocs";
• Find DirectoryIndex, add index.php, index.htm and so on after index.html, separate it with a single space;
• Restart Apache to test for success with http://localhost/or HTTP://127.0.0.1/or http://yourcompanyname/. The success of the words screen will have an IT works!
Second, install the configuration PHP (decompression PHP compression package to d:\php\)
1. Rename the php.ini-recommended file to php.ini and cut it to the directory where the system is located (such as 2000/nt winnt/system32, xp windows/system32 directory),
2, change the Extension_dir to Php/ext directory, such as "D:\php\ext";
3, the doc_root changed to the same directory in the first step, such as "E:\Program Files\apache software Foundation\apache2.2\htdocs";
4, find; Session.save_path = "/tmp", will '; ' Remove, set the directory where you saved the session, such as Session.save_path = "d:/php/session_temp";
5. Then remove the semicolon in front of the following sentence to better support MySQL and PHPmyadmin
Extension=php_mbstring.dll
Extension=php_gd2.dll
Extension=php_mysql.dll
Third, Php+apache
1. Allow Apache to run the PHP program as a module:
Open httpd.conf and add the following (any location):
LoadModule php5_module "D:/php/php5apache2_2.dll" (pay special attention to this one, many places are called php5apache2.dll, so that when running PHP code will prompt httpd.exe application errors)
AddType application/x-httpd-php. php
AddType application/x-httpd-php. htm
(. htm,. php Extensions for executable PHP languages, plus HTML, php3, PHP4, and even txt)
(The following two steps may not be required)
2. If you need to run a PHP program in CGI mode for some reason (using Php.exe),
Please turn the above line into a comment (each outfit adds #) and add the following lines:
# scriptalias/php/"d:/php/"
# AddType application/x-httpd-php. php
#Action application/x-httpd-php "/php/php-cgi.exe"
3, now Apache 2 support HTML and not support PHP, first add the following sentence to d:\apache2\conf\httpd.conf:
# scriptalias/php/"d:/php/"
# AddType application/x-httpd-php. php
#Action application/x-httpd-php "/php/php-cgi.exe"

IV. Restart Service
1, found in the D:\PHP php5ts.dll,libmysql.dll copy it to C:\Winnt\System32 (winnt/2000 machine), and winxp/2003 is copied to C:\Windows\System32
2. Test whether Apache and PHP are connected successfully:
Start the start Apache service or restart restart Apache if it is running
3. Create a new test.php (i.e. E:\Program files\apache software Foundation\apache2.2\htdocs) under the Web root directory

<title>Test</title>

Phpinfo ();
?>

4. Running http://localhost/test.php
If successful, you should see a Web page with a PHP logo that contains a number of settings and other information
Well, congratulations.

Note:
If not, use the traditional modular method to install php5.1.* + Apache 2.2.2 After you cannot start,

Tips:
"Cannot load D:/php/php5apache2.dll into server:the specified module could isn't be found."

Reason:

PHP Compression package Php5apache2.dll only applicable to apache2.0.*, whether to change the Php5apache2.dll to Php5apache2_2.dll that is the third step of the 1th small steps
Another workaround:

Vcredist_x86.exe
Php5apache2.dll
Httpd.exe.manifest
1. Overwrite the Php5apache2.dll file in your original PHP directory with the Php5apache2.dll.
2. Copy the Httpd.exe.manifest file to the Bin folder under your Apache installation directory.
3. Double-click Run Vcredist_x86.exe installation.
Go ahead and try to restart your Apache.

http://www.bkjia.com/PHPjc/477613.html www.bkjia.com true http://www.bkjia.com/PHPjc/477613.html techarticle because of the version update, these files have a new name: I used 5.4 so php.ini-production corresponds to php.ini-recommended php.ini-development corresponds to Php.ini-dist The other steps are the same ...

  • 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.