1. Download apmserv5.1.2.rar and decompress
2. Open apmserv5.1.2main program apmserv.exe
3. Virtual Host Configuration (click to zoom in if you cannot see it clearly)
4. virtual directory configuration (click to zoom in if you cannot see it clearly)
|
1. Q: How can I migrate the webpage and database data in the old version of APMServ 5.0.4 enhanced version to APMServ 5.1.2?
A: extract APMServ 5.1.2 to another directory. If the earlier version of APMServ 5.0.4enhanced version is in the startup state, click the stop button in the earlier version of apmserv.exe, copy all the directories except the phpmyadmin directory under the old www webpage directory to the www \ htdocs directory of version 5.1.2, copy all the directory files under the old MySQL \ data database directory to the MySQL4.0 \ data directory of version 5.1.2, and confirm that the web pages and databases can be accessed normally in version 5.1.2, delete the old version directory.
2. Question: "port 80 and port 443 are occupied and Apache2 cannot be started ." Why?
A: If you have IIS or other HTTP server software installed and started, port 80 will be used (if SSL support is enabled for IIS, port 443 will also be used). You can change one port for IIS, you can also change the Apache port in APMServ.
3. Q: Why does "Apache2" or "Apache2" not exist in the Windows Service list after APMServ is started?
A: Do not place APMServ in a path containing Chinese characters, because Apache started in service mode does not support Chinese directories, for example, "D: \ website Server \ APMServ \ "will cause Apache to fail to start. Similarly, when a VM or virtual directory is added, the path cannot contain Chinese characters.
4. Q: I used MySQL5.1 to create a database and import the data of MySQL4.0.x. It was garbled, it is like this: ", All are question marks. How can this problem be solved?
A: MySQL has added support for multi-language and multi-character sets since MySQL. APMServ uses the Chinese Character Set GBK. In the old versions of MySQL4.0.x and MySQL3.x, the default character set is latin1, which is stored in latin1 encoding. Because only one character set is supported, if you use latin1 encoding instead of Chinese characters, no garbled characters are generated.
Import old MySQL4.0.x data to MySQL4.1.x or 5. x and other MySQL high-version databases that support multiple character sets, the data stored in latin1 encoding without Chinese encoding will be displayed as "??? ". There are many solutions. You can search Baidu and Google for "MySQL4.1 Character Set" or "MySQL5 Character Set" to learn more. Here is a simple way to open the file in the PHP program that is responsible for connecting to the MySQL database (such as conn. php), and add a line of 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 ');
Appendix: Discuz! There is an article on the official forum for Discuz! The user's description of "garbled characters After conversion or upgrade" describes the character set problems of MySQL and later. For details, refer.
Http://www.discuz.net/viewthread.php? Tid = 201826
5. Q: Will an apache.exe occupy a maximum of MB of memory in the process after the worker server runs continuously for multiple days or after the peak value?
A: use NotePad to open apache2 \ conf \ httpd. conf, search for MaxRequestsPerChild, and change MaxRequestsPerChild 0 to MaxRequestsPerChild 50.
Generally, two apache.exe processes can be viewed in the "Windows Task Manager" process. One is the parent process and the other is the child process. After receiving the access request, the parent process submits the request to the child process for processing. The MaxRequestsPerChild command sets the number of requests that an independent sub-process can process. After the "MaxRequestsPerChild number" request is processed, 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 are other access requests, the parent process re-generates the child process for processing.
If MaxRequestsPerChild is set to 0 (unlimited) by default or a large number (such as more than 10000), each sub-process can process more requests, it will not reduce the access efficiency because of continuous termination or promoter processes, but if MaxRequestsPerChild is set to 0, if it occupies 200 ~ MB of memory, even if the load is down, the occupied memory will not be reduced. A server with a large memory can be set to 0 or a large number. A server with a small memory can be set to 30, 50, or 100 to prevent memory overflow.
6. Q: Why are some PHP programs written in earlier versions of PHP unable to pass variables in APMServ?
A: based on security considerations, PHP developers disable automatic global variables in PHP 4.2.0 and later versions of get, post, and session, to obtain the submitted variables from the previous page, use $ _ GET ['foo'], $ _ POST ['foo'], and $ _ SESSION ['foo ']., in the previous PHP version, variables can be obtained directly. This causes some PHP programs written in the old version of PHP to fail to pass variables in the new version of PHP (the PHP version in APMServ 5.1.2 is the latest version 5.1.2 ).
You can also change the automatic global variable to On (use NotePad to open APMServ \ PHP \ php. ini-dist and change register_globals = Off TO register_globals = On ). Considering the Security and compatibility, it is better to familiarize yourself with the new writing method as required by the new PHP version.
For instructions on automatic global variables in the PHP manual, see:
Http://cn.php.net/manual/zh/language.variables.predefined.php
For security issues that may result from opening automatic global variables in the PHP manual, see:
Http://cn.php.net/manual/zh/security.globals.php