《APMServ 5.1.2》使用图解
1、下载APMServ5.1.2.rar并解压缩 2、打开APMServ5.1.2主程序APMServ.exe 3、虚拟主机配置(看不清可点击放大) 4、虚拟目录配置(看不清可点击放大) |
1、问:如何将旧版本的《APMServ 5.0.4增强版》中的网页和数据库资料迁移到《APMServ 5.1.2》中?
答:将《APMServ 5.1.2》解压缩到另外一个目录,如果旧版本的《APMServ 5.0.4增强版》处于启动状态,先点击旧版APMServ.exe中的停止按钮,然后将旧版本www网页目录下的除phpmyadmin目录以外的目录文件全部复制到5.1.2版的www\htdocs目录下,将旧版本MySQL\data数据库目录下的目录文件全部复制到5.1.2版的MySQL4.0\data目录下,确认在5.1.2版中能够正常访问这些网页和数据库后,删除旧版本目录即可。
2、问:“80、443端口被占用,Apache2无法启动。”是怎么回事?
答:如果您装有IIS或其它HTTP服务器软件并启动,将占用80端口(如果IIS开启SSL支持,还会占用443端口),可以将IIS更改一个端口,或者在APMServ中更改Apache的端口。
3、问:为什么启动APMServ后,但在Windows的服务列表中没有“Apache2”一项或“Apache2”处于停止状态?
答:请不要将APMServ放在含有中文的路径中,因为以服务模式启动的Apache不支持中文目录,例如“D:\网站服务器\APMServ\”会导致Apache无法启动。同理,添加虚拟主机、虚拟目录时,路径中也不能含有中文。
4、问:我用MySQL5.1新建数据库和导入原来MySQL4.0.x的数据全是乱码,就像这样“?????????????????????”,全是问号,如何解决?
答:从MySQL4.1版本开始,MySQL增加对多国语言、多字符集的支持,APMServ使用了中文字符集GBK。而旧的MySQL4.0.x、MySQL3.x版本一般默认的字符集是latin1,以latin1编码进行储存,由于只支持单字符集,以非中文编码的latin1编码保存中文数据并不会出现乱码。
旧MySQL4.0.x数据导入MySQL4.1.x或5.x等支持多字符集的MySQL高版本数据库后,非中文编码的latin1编码保存的数据就会显示成“??????????????”。解决方法有很种,你可以在百度、Google搜索“MySQL4.1 字符集”或“MySQL5 字符集”了解相关资料。这里给你一种简便的方法,打开PHP程序中负责连接MySQL数据库的文件(例如conn.php),增加一行mysql_query('set character set GBK');即可。例如:
$conn=mysql_connect ("127.0.0.1", "root", "");
mysql_select_db("database"); //database是数据库名
mysql_query('set character set GBK');
附:Discuz!官方论坛有一篇针对Discuz!用户的“关于转换或者升级以后出现乱码情况的说明”,对MySQL4.1及更高版本的字符集问题有详细地介绍,你可以参考一下。
http://www.discuz.net/viewthread.php?tid=201826
5、问:为什么服务器在连续运行多天后或访问峰值后,进程中的一个Apache.exe占用内存上百兆不减少?
答:用记事本打开apache2\conf\httpd.conf,查找MaxRequestsPerChild,将MaxRequestsPerChild 0改成MaxRequestsPerChild 50即可。
通常在“Windows任务管理器-进程”中可以看到两个apache.exe进程,一个是父进程、一个是子进程,父进程接到访问请求后,将请求交由子进程处理。MaxRequestsPerChild这个指令设定一个独立的子进程将能处理的请求数量。在处理“MaxRequestsPerChild 数字”个请求之后,子进程将会被父进程终止,这时候子进程占用的内存就会释放,如果再有访问请求,父进程会重新产生子进程进行处理。
如果MaxRequestsPerChild缺省设为0(无限)或较大的数字(例如10000以上)可以使每个子进程处理更多的请求,不会因为不断终止、启动子进程降低访问效率,但MaxRequestsPerChild设置为0时,如果占用了200~300M内存,即使负载下来时占用的内存也不会减少。内存较大的服务器可以设置为0或较大的数字。内存较小的服务器不妨设置成30、50、100,以防内存溢出。
6、问:为什么某些在老版本PHP中编写的PHP程序,在APMServ中不能传递变量?
答:PHP开发组基于安全性考虑,get、post、session在PHP 4.2.0以及后续版本中,自动全局变量默认是关闭的,所以要从上一页面取得提交过来得变量要使用$_GET['foo']、$_POST['foo']、$_SESSION['foo']来得到,而在之前的PHP版本中直接就可以取得变量。这就造成了某些在旧版本PHP中编写的PHP程序,在新版本PHP中不能传递变量(APMServ 5.1.2中的PHP版本为最新的5.1.2)。
当然您也可以修改自动全局变量为开(用记事本打开APMServ\PHP\php.ini-dist,修改register_globals=Off为register_globals=On)。考虑到安全性与兼容性,还是强迫自己按照PHP新版本的要求,熟悉新的写法比较好。
《PHP手册》自动全局变量的相关说明请见:
http://cn.php.net/manual/zh/language.variables.predefined.php
《PHP手册》打开自动全局变量可能导致的安全性问题请见:
http://cn.php.net/manual/zh/security.globals.php

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



When you log in to someone else's steam account on your computer, and that other person's account happens to have wallpaper software, steam will automatically download the wallpapers subscribed to the other person's account after switching back to your own account. Users can solve this problem by turning off steam cloud synchronization. What to do if wallpaperengine downloads other people's wallpapers after logging into another account 1. Log in to your own steam account, find cloud synchronization in settings, and turn off steam cloud synchronization. 2. Log in to someone else's Steam account you logged in before, open the Wallpaper Creative Workshop, find the subscription content, and then cancel all subscriptions. (In case you cannot find the wallpaper in the future, you can collect it first and then cancel the subscription) 3. Switch back to your own steam

Recently, many users have been asking the editor, how to download links starting with 115://? If you want to download links starting with 115://, you need to use the 115 browser. After you download the 115 browser, let's take a look at the download tutorial compiled by the editor below. Introduction to how to download links starting with 115:// 1. Log in to 115.com, download and install the 115 browser. 2. Enter: chrome://extensions/ in the 115 browser address bar, enter the extension center, search for Tampermonkey, and install the corresponding plug-in. 3. Enter in the address bar of 115 browser: Grease Monkey Script: https://greasyfork.org/en/

The superpeople game can be downloaded through the steam client. The size of this game is about 28G. It usually takes one and a half hours to download and install. Here is a specific download and installation tutorial for you! New method to apply for global closed testing 1) Search for "SUPERPEOPLE" in the Steam store (steam client download) 2) Click "Request access to SUPERPEOPLE closed testing" at the bottom of the "SUPERPEOPLE" store page 3) After clicking the request access button, The "SUPERPEOPLECBT" game can be confirmed in the Steam library 4) Click the install button in "SUPERPEOPLECBT" and download

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

Many users need to download files when using Quark Network Disk, but we want to save them locally, so how to set this up? Let this site introduce to users in detail how to save files downloaded from Quark Network Disk back to the local computer. How to save files downloaded from Quark network disk back to your local computer 1. Open Quark, log in to your account, and click the list icon. 2. After clicking the icon, select the network disk. 3. After entering Quark Network Disk, click My Files. 4. After entering My Files, select the file you want to download and click the three-dot icon. 5. Check the file you want to download and click Download.

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

Douyin is a popular short video social application. Users can not only watch and share various types of short video content, but also provide a series of mini games for you to play. So where can I get into Douyin mini-games? Where is the entrance to Douyin mini game? Let’s take a look at the detailed tutorial below. Method 1: Open the mini program 1. Click the My option. After entering the homepage of Douyin, click the My option to enter. 2. Click the three horizontal lines. After entering the My interface, click the three horizontal lines button above. 3. Click on the mini program. After opening the three horizontal lines option, click on the mini program inside. 4. Click on the Douyin Mini Game. After entering the mini program interface, click on the Douyin Mini Game option to open it. Method 2: Search and open 1. Click the magnifying glass to enter

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below
