Home  >  Article  >  Backend Development  >  php5+apache+mysql5 configuration explanation under Windows_PHP tutorial

php5+apache+mysql5 configuration explanation under Windows_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:09:26734browse

1. Installation of apache. The next step is also suitable for most people. During the next process, you may need to fill in server domain, admin email and other similar things. This can be skipped, but you must pay attention to the port selection. By default, only ports 80 and 8080 are available for selection. Of course, after the installation is successful, you can modify the listen port at will. To avoid duplication with the iis default 80, you can choose port 8080. I won’t talk about the situation after the installation is successful after next. In some basins, after the installation is completed, the apache service cannot be found in the apache server monitor, and the apache-related services cannot be found in services.msc. I just encountered this problem, and the solution is also very simple: administrator identity Run cmd, switch to the directory $apache2.2$binhttpd.exe -k install and it's almost done. I prompted an error once, but the service still appeared. Clicking start can still run. Under normal circumstances, it prompts that the installation is successful and starts testing httped. .conf... At this point, the installation of apache is complete. Of course, you can test it. You can open httpd.conf and modify the documentroot configuration section about 164 lines. I modified it like this: documentroot "c:/". Note that if If you have never done it before or are afraid of not being able to find the default httpd.conf, you can make a backup first or comment out the configuration section you want to modify. Then find the , which is the directory of the website you want to visit. Then restart apache and enter: http://localhost: in the browser. 8080/testing.html Let’s take a look.

2. Installation of mysql tutorial. It seems that there is nothing to pay attention to when installing mysql. There is a question about whether to allow remote access. If you are just doing testing, then don't select it. If it is a server, then carefully consider the security issues.

3. Installation of the php tutorial environment, as mentioned above, after downloading and decompressing the php environment, create a folder named apahe group in the root directory of the c drive, and create a folder name in the apache group directory It is php5, because the php version I downloaded is php-5.3.5-win32-vc9-x86.zip, so 5 is the version number of the current running environment. Haha, I copied it from an expert. Then copy all the files in the download package to the php5 folder, find the file named php.ini-production, and rename it to php.ini. Open php.ini, find short_open_tag, change the default "short_open_tag= off" to "short_open_tag =on", that is, let php support short tag writing. For example, when it is set to off, use An error will be reported, so it must be written as . Then find the line extension_dir = "./" in php.ini and change it to extension_dir = "c:/apache group/php5/ext", so that the PHP running environment can find the extension plug-ins it needs based on this directory. position, be careful to delete the ";" in front of the line. Then find the windows extensions configuration module, look for

extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_mysql.dll

and then change the previous points ";" opens the PHP environment's support for mysql and other processes, so that the PHP program can perform operations such as connecting to the database tutorial. Finally find disable_functions = and modify it to disable_functions =
passthru,exec,system,popen,chroot,escapeshellcmd,escapeshellarg,shell_exec,proc_open,proc_get_status. After completion, the address of the php running environment is: c:apache groupphp5. This address will be used in subsequent apache configuration.

 4.apache is configured to support php. Open $apache2.2$confhttpd.conf and find the line #loadmodule ssl_module modules/mod_ssl.so. After that, add the following lines:

# Specify the location of the php.ini file

phpinidir "c:apache groupphp5"

# Specify the parsing module of the php program

loadmodule php5_module "c:apache groupphp5php5apache2_2.dll"

# Specify the parsing module of the file to be parsed Extension

addtype application/x-httpd-php .php

# Specify the php source code extension

addtype application/x-httpd-php-source .phps tutorial

Save and exit. At this time, the running environment of apache+mysql+php5 is set up. You can create a new file phpinfo.php in the test directory and write in it:

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444802.htmlTechArticle1. Installation of apache. The next step is also suitable for most people. During the next process, you may need to fill in server domain, admin email and other similar things. You can skip this, but pay attention to the port...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn