Home > Backend Development > PHP Tutorial > 'APMSer 5.1.2' usage diagram_PHP tutorial

'APMSer 5.1.2' usage diagram_PHP tutorial

WBOY
Release: 2016-07-21 16:01:03
Original
1254 people have browsed it

1、下载APMServ5.1.2.rar并解压缩
'APMSer 5.1.2' usage diagram_PHP tutorial

2、打开APMServ5.1.2主程序APMServ.exe
'APMSer 5.1.2' usage diagram_PHP tutorial

3、虚拟主机配置(看不清可点击放大)
'APMSer 5.1.2' usage diagram_PHP tutorial

4、虚拟目录配置(看不清可点击放大)
'APMSer 5.1.2' usage diagram_PHP tutorial
1. Question: How to migrate the web pages and database data in the old version of "APMServ 5.0.4 Enhanced Edition" to "APMServ 5.1.2"?
Answer: Unzip "APMServ 5.1.2" to another directory. If the old version of "APMServ 5.0.4 Enhanced Edition" is started, first click the stop button in the old version of APMServ.exe, and then Copy all the directory files in the www web page directory of the old version except the phpmyadmin directory to the wwwhtdocs directory of version 5.1.2, and copy all the directory files in the MySQLdata database directory of the old version to version 5.1.2 In the MySQL4.0data directory, after confirming that these web pages and databases can be accessed normally in version 5.1.2, delete the old version directory.
 
2. Question: "Ports 80 and 443 are occupied and Apache2 cannot be started." What's going on? Answer: If you install IIS or other HTTP server software and start it, it will occupy port 80 (if IIS turns on SSL support, it will also occupy port 443). You can change IIS to a port, or in APMServ Change Apache's port.

 
3. Question: Why is there no "Apache2" item in the Windows service list or "Apache2" is stopped after starting APMServ? Answer: Please do not put APMServ in a path containing Chinese, because Apache started in service mode does not support Chinese directories. For example, "D:Website Server APMServ" will cause Apache to fail to start. In the same way, when adding a virtual host or virtual directory, the path cannot contain Chinese characters.

 
4. Question: I used MySQL5.1 to create a new database and imported the original MySQL4.0.x data, all of which were garbled, like this "???????????? ?????????", all question marks, how to solve it? Answer: Starting from MySQL version 4.1, MySQL has added support for multiple languages ​​and character sets. APMServ uses the Chinese character set GBK. The default character set of the old MySQL4.0.x and MySQL3.x versions is latin1, which is stored in latin1 encoding. Since it only supports a single character set, saving Chinese data in non-Chinese latin1 encoding will not cause garbled characters.
After the old MySQL 4.0.x data is imported into a MySQL high version database that supports multiple character sets such as MySQL 4.1.x or 5.x, the data saved in non-Chinese latin1 encoding will be displayed as "???? ??????????".There are many solutions. You can search for "MySQL4.1 character set" or "MySQL5 character set" on Baidu and Google to learn relevant information. Here is a simple method for you, open the file in the PHP program responsible for connecting to the MySQL database (such as conn.php), and add a line mysql_query('set character set GBK');. For example:
$conn=mysql_connect ("127.0.0.1", "root", "");
mysql_select_db("database"); //database is the database name
mysql_query('set character set GBK ');
Attachment: The Discuz! official forum has an article "Instructions on garbled characters after conversion or upgrade" for Discuz! users. It has a detailed introduction to the character set issues of MySQL4.1 and higher versions. You can You can refer to it.
 http://www.discuz.net/viewthread.php?tid=201826

 5. Question: Why does the server fail after running continuously for many days or after peak access? , an Apache.exe in the process occupies hundreds of megabytes of memory without reducing it?
Answer: Open apache2confhttpd.conf with Notepad, search for MaxRequestsPerChild, and change MaxRequestsPerChild 0 to MaxRequestsPerChild 50.
Usually you can see two apache.exe processes in "Windows Task Manager - Processes", one is the parent process and the other is the child process. After the parent process receives the access request, it hands the request to the child process for processing. MaxRequestsPerChild This directive sets the number of requests that an independent child process will be able to handle. After processing "MaxRequestsPerChild number" requests, the child process will be terminated by the parent process. At this time, the memory occupied by the child process will be released. If there is another access request, the parent process will re-spawn the child process for processing.
If MaxRequestsPerChild is set to 0 (infinite) or a larger number (for example, more than 10,000) by default, each child process can handle more requests, and access efficiency will not be reduced due to continuous termination and startup of child processes. However, MaxRequestsPerChild setting When it is 0, if 200~300M of memory is occupied, the memory occupied will not be reduced even when the load is reduced. Servers with larger memory can be set to 0 or a larger number. Servers with smaller memory may wish to set it to 30, 50, or 100 to prevent memory overflow.

 6. Question: Why can’t some PHP programs written in old versions of PHP pass variables in APMServ?
Answer: The PHP development team is considering security. In PHP 4.2.0 and subsequent versions, automatic global variables for get, post, and session are turned off by default, so the submitted variables must be obtained from the previous page. You need to use $_GET['foo'], $_POST['foo'], $_SESSION['foo'] to get it, and in previous PHP versions, you can get the variable directly. This causes some PHP programs written in the old version of PHP to be unable to pass variables in the new version of PHP (the PHP version in APMServ 5.1.2 is the latest 5.1.2).
Of course, you can also modify the automatic global variables to be on (open APMServPHPphp.ini-dist with Notepad and modify register_globals=Off to register_globals=On). Considering security and compatibility, it is better to force yourself to follow the requirements of the new PHP version and become familiar with the new writing method.
"PHP Manual" For relevant instructions on automatic global variables, please see:
http://cn.php.net/manual/zh/language.variables.predefined.php
"PHP Manual" Turn on automatic global variables For security issues that variables may cause, please see:
 http://cn.php.net/manual/zh/security.globals.php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/316976.htmlTechArticle1. Download APMServ5.1.2.rar and decompress it 2. Open the APMServ5.1.2 main program APMServ.exe 3. Virtual host configuration (click to enlarge if you cannot see clearly) 4. Virtual directory configuration (click to enlarge if you cannot see clearly...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template