Wamp Study Diary: Apache publishes PHP website

Source: Internet
Author: User
Tags php website vbulletin

1. Modify the httpd.conf file to allow Apache and PHP modules to be associated

2. Configuring the php.ini File

Modify the httpd.conf file to have Apache and PHP modules associated


How do I get Apache and PHP to connect? Configure the PHP module with the configuration file httpd.conf in Apache.
Add module: LoadModule php5_module "php path/php5apache2_2.dll"
Build file association: AddType application/x-httpd-php. php
Establish default index: DirectoryIndex index.php default.php index.htm

Create a new site.
<virtualhost *:80>
DocumentRoot "need to publish site location"
ServerName IP Address

</VirtualHost>

Modify the php.ini file

1. Look for "Extension_dir" in Notepad and then put Extension_dir = "./"
Modify to Extension_dir = "C:/php/ext"//This is the path of PHP

2. Look for "; Extension=php_mysql.dll" and "Extension=php_gd2.dll" in Notepad, then put the front ";" To remove, namely, to Extension=php_mysql.dll; change to Extension=php_mysql.dll.
Change the Extension=php_gd2.dll to Extension=php_gd2.dll.

Restart Wamp for IP access

How do I get PHP to support MySQL modules? Modify the php.ini file, for the time being I did not close the test, and later still have to look at the user manual. In the future, the user manuals and development documents are equally important in the development process, the exchange of documents in a certain period of time or occupy a large space

The Windows system must copy Libmysql.dll in the PHP directory to the Windows directory to allow PHP to support MySQL.

Enter x:/server/php ... Rename Php.ini-recommend to php.ini and open with a text editor ...
To modify the error reporting level ... Run some programs that are not standard in writing ... You will find the full screen of the ' error ' ...
Search:
error_reporting = E_all
Modified to:
error_reporting = error_reporting = E_all & ~e_notice & ~e_strict
Because it is local debugging, I certainly hope that the error is output for me to debug ...
Search:
Display_errors = Off
Modified to:
Display_errors = On
For local developers, it doesn't seem necessary to log errors ...
Search:
Log_errors = On
Modified to:
Log_errors = Off
It is necessary to set the path of the extension library ...
Search:
Extension_dir = "./"
Modified to:
Extension_dir = "X:/server/php/ext"
PHP 5 does not turn on MySQL support by default ...
Search:
; Extension=php_mysql.dll
Remove the preceding semicolon:
Extension=php_mysql.dll
In addition, VBulletin has already enabled the support of mysqli ... So here we introduce MySQL extension library ...
Search:
Extension=php_mysql.dll
Add below:
Extension=php_mysqli.dll
Of course, in order to better use some of VBulletin's image-related functions, we need to enable the GD2 library ...
Search:
; Extension=php_gd2.dll
Remove the preceding semicolon:
Extension=php_gd2.dll
We also want to make calls to some of the more commonly used libraries, such as Php_mbstring.dll, Php_curl.dll, Php_sockets.dll, Php_xmlrpc.dll, etc... Open the same way as above ...
(only common extensions are enabled here ...). Other extensions please decide on your own needs ... )
Although VBulletin uses its built-in session mechanism, the session mechanism of PHP is necessary in many programs ...
Search:
; Session.save_path = "/tmp"
Modified to an existing path ...
or create a TMP directory under the Publish directory ...
Here we use the previous method ... First create such a directory x:/session ...
Then modify to:
Session.save_path = "X:/session"

Wamp Study Diary: Apache publishes PHP website

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.