"Apmserv 5.1.2" using Graphical _php basics

Source: Internet
Author: User
1, download Apmserv5.1.2.rar and decompression


2, open APMServ5.1.2 main program APMServ.exe


3, the virtual host configuration (can not see clearly click to enlarge)


4, the virtual directory configuration (can not see clearly click to enlarge)

  1, Q: How the old version of the "Apmserv 5.0.4 enhanced version" of the Web page and database data migrated to the "Apmserv 5.1.2"?
A: the "Apmserv 5.1.2" to another directory, if the old version of the "Apmserv 5.0.4 enhanced Version" in the Startup state, first click on the old version of the APMServ.exe in the Stop button, and then the old version of the WWW web page directory In addition to the phpMyAdmin directoryDirectory files are copied to the 5.1.2 version of the Www\htdocs directory, the old version of the Mysql\data database directory files in all copy to the 5.1.2 version of the Mysql4.0\data directory, Confirm that the pages and databases can be accessed normally in version 5.1.2, deleting the old version directory.

   2, Q: "80, 443 ports are occupied, Apache2 can not start." "What's going on?"
A: If you have IIS or other HTTP Server software installed and started, it will take up 80 ports (if IIS turns on SSL support and also consumes 443 ports), you can change IIS to one port or change the Apache port in Apmserv.

   3. Q: Why did you start Apmserv, but there is no "Apache2" or "Apache2" in the list of Windows services in the stop state?
A: Please do not put apmserv in the path containing Chinese, because Apache launched in service mode does not support Chinese directories, such as "D:\ Web server \apmserv\" can cause Apache to fail to start. Similarly, when you add a virtual host or virtual directory, you cannot include Chinese in the path.

   4, Q: I use MySQL5.1 to create a new database and import the original mysql4.0.x of the data is garbled, like this "?????????????????????", are all question marks, how to solve?
A: From the MySQL4.1 version, MySQL to increase the number of languages, multiple character set support, Apmserv used the Chinese character set GBK. The old mysql4.0.x, mysql3.x version of the general default character set is Latin1, latin1 encoding for storage, because only the single character set, in non-Chinese encoded latin1 code to save Chinese data does not appear garbled.
When old mysql4.0.x data is imported into a MySQL high version database that supports multiple character sets such as mysql4.1.x or 5.x, the data saved by a latin1 encoding that is not encoded in Chinese is displayed as "??????????????." There are a lot of solutions, you can in Baidu, Google search "MySQL4.1 character set" or "MySQL5 character set" to understand the relevant information. Here's a handy way to open a file (such as conn.php) in a PHP program that is responsible for connecting to the MySQL database, adding one line of mysql_query (' Set character set GBK '); For example:
$conn =mysql_connect ("127.0.0.1", "Root", "");
mysql_select_db ("database"); DB is database name
mysql_query (' Set character set GBK ');
Attached: discuz! Official forum There is a discuz! user's "on the conversion or after the upgrade of the description of garbled situation," the MySQL4.1 and later version of the character set problem has been introduced in detail, you can refer to.
   http://www.discuz.net/viewthread.php?tid=201826

   5, Q: Why the server in the continuous operation days or after the peak access, the process of a Apache.exe occupy the memory of the hundred trillion does not reduce?
Answer: With Notepad open apache2\conf\httpd.conf, find Maxrequestsperchild, will maxrequestsperchild 0 to Maxrequestsperchild 50 can be changed.
Typically, you can see two apache.exe processes in Windows Task Manager-process, one for the parent process, one for the child, and the parent process to process the request to the child process after it receives the access request. Maxrequestsperchild This instruction sets the number of requests that a separate subprocess will be able to process. After the Maxrequestsperchild number request is processed, the child process is terminated by the parent process, and the memory that is consumed by the child process is released, and if there is another access request, the parent process will re-create the subprocess to process it.
If Maxrequestsperchild defaults to 0 (infinity) or larger numbers (for example, 10000 or more), each subprocess can process more requests, not because of the constant termination, the start of the subprocess, but the maxrequestsperchild set to 0 o'clock, If 200~300m memory is consumed, the memory consumed even when it is loaded is not reduced. A server with a larger memory can be set to 0 or larger numbers. Servers with smaller memory may be set to 30, 50, 100 to prevent memory overflow.

   6, Q: Why some PHP in the old version of PHP program, in the Apmserv can not pass the variable?  
A: PHP Development group based on security considerations, GET, post, session in the PHP 4.2.0 and subsequent versions, the automatic global variable is closed by default, so to obtain the submission from the previous page from the variable to use $_get[' foo ', $_post[' foo ', $ _session[' foo ' comes in, and the variables can be obtained directly from the previous PHP version. This causes some PHP programs written in the old version of PHP that cannot be passed in the new version of PHP (PHP version in Apmserv 5.1.2 is the newest 5.1.2).
Of course you can also modify the automatic global variable to open (with Notepad to open apmserv\php\php.ini-dist, modify Register_globals=off for Register_globals=on). Consider the security and compatibility, or force yourself to follow the new version of PHP requirements, familiar with the new wording is better.
For instructions on automatic global variables in the PHP manual, see:
http://cn.php.net/manual/zh/language.variables.predefined.php
PHP manual turning on automatic global variables may cause security issues see:
http://cn.php.net/manual/zh/security.globals.php

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.