关于本地计算机无法启动Apache2,计算机启动Apache2
关于本地计算机无法启动Apache2,计算机启动Apache2
最近因工作需要,要学习PHP的基础编程,于是学习架设PHP工作环境。
但按照教材上介绍的那样,安装了WMAP后,一直无法运行成功。后发现Apache一直都不在运行状态。到WMAP中的Apache选项中去选择启动但无法启动。
后经高人指点,总结出如下可能性无法启动Apache:
可能情况一:
安装Apache2的路径中不能含有中文.
可能情况二:
重启Apache就会弹出出错提示框,提示"The requested operation has failed!" 然后打开服务,启动Apache2,就提示我:
"Windows不能在本地计算机启动Apache2.......并参考特定服务错误代码1"
解决:主要是在Apache的安装目录下的\conf\httpd.conf,修改httpd.conf文件下的
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
把80端口改成81或者其他的 ,
改成后,
#Listen 12.34.56.78:81080
Listen 8080
再重启ApacheServices就不会出现问题了
也许,这种方法对于不同版本的Apache可能有不同的解决方法,我在配置时是用的apache_2.2.11-win32-x86-no_ssl.msi版本的,其他版本的我不是很清楚,是不是这样改,在这里分享下我解决问题后的喜悦吧!
可能情况三:
因为这几星期比较忙,所以很少去搞PHP.但今天突然想起开学时写的几个关于日历的PHP程序,想改进它,所以就从服务那里启动Apache,但却出现警告说:
“windows 不能在本地计算机启动apache2。有关更多信息,查阅系统事件日志。如果这是非Microsoft服务,请与服务厂商联系,并参考特定服务错误代码1。”
试
了几次都不行,再启动MYSQL.却能成功启动.为什么就不能启动Apache呢?想想好像上次改动过httpd.conf文件.那时只是
把"AddCharset GB2312"改为"AddDefaultCharset
GB2312"因为我的那些PHP程序不能取得URL中的中文字符.所以以为是这里出了问题,所以那时就改为"AddDefaultCharset
GB2312",以为下次搞时再去验证行不行,所以就没有启动过Apache,直到今天启动时发现有这个问题.改回原来的"AddCharset
GB2312"再次启动!却能成功启动!看来是这字符设置的问题!
可能情况四:
打开了迅雷,迅雷默认占用80端口。关闭迅雷再重启Apache服务即可!
是不是没有关闭IIS服务啊。就是右键我的电脑,管理有个服务那项里面的IIS,windows7系统不用关闭,自动就能运行啊。。是不是64位系统的啊
Apache-20\conf\mime.types
解决办法直接复制一个这个文件,然后重新启动就可以了!

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

First download the latest Win11 system ISO image, and then in Win10 system, you can directly right-click on the downloaded ISO image file and select [Load]; if it is under WinPE, WinXP, or Win7 system, you need to use the virtual optical drive tool to load the ISO Image; or you can directly decompress the ISO image file without using a virtual optical drive. Then run WinNTSetup. The software interface is as shown in the figure: First locate the location of the install.wim file. You can find the install.wim file in the sources directory of the Win11 ISO image loaded or decompressed by the virtual optical drive. Then set the location of the boot disk and installation disk. Generally, you are going to put W

When I turn on the computer, it always stops at the motherboard logo screen. Nothing happens when I press anything, and I can't enter the bios? This is usually because the BIOS battery voltage is too low, and the system time has returned to the BIOS preset time, such as 2000.1.1, 00:00. You can use it after pressing F1 to enter the bios and set the time. Do not turn off the AC power after shutting down at night. Generally, the system time will not be lost when you turn on the computer the next day, and you can still enter the system normally. If the AC power is cut off, the battery voltage cannot sustain the power consumption of the bios, and the computer will be in the same state again the next day when it is turned on. Replacing the bios battery is the ultimate solution. Win11 is stuck on the motherboard logo interface when booting? 1. It is a problem with bios settings. We only need to find the corresponding setting items.

To connect Windows 7 to a Cellular Hotspot, follow these steps: Open the Wireless Network Connections panel and find the Cellular Hotspot network. Right-click on the hotspot network and select Connect. Verify connection.

But sometimes users may encounter the problem that the network adapter suddenly disappears. Win7 operating system is a widely used operating system, which brings great troubles to network connection and use. To help users quickly solve network connection problems, this article will introduce the methods and steps on how to restore the Win7 network adapter. 1. Check the network adapter in the device manager 2. Uninstall and reinstall the network adapter driver. Select, right-click the network adapter and "Uninstall Device" and then restart the computer and install the driver automatically, or go to the official website to download the latest driver and install it manually. . 3. Check whether the device is disabled. Search for "Network Connections" in the start menu, open it, right-click the wireless connection or Ethernet connection, and select "Enable" to ensure that the device has not been disabled.

How many msiz270-apro graphics cards can the z270 graphics card support up to 3070TI? According to the relevant information, msi MSI z270 is a laptop with DOS operating system and a screen size of 16 inches 1366x768. Due to its good CPU performance, msiz270-apro has a graphics card of up to 3070TI. The choice of graphics card depends mainly on the CPU, not the motherboard. The z270 supports 7th generation Core by default. If you have an i7-7700k, it will be no problem with this graphics card. If u is too low, there will be a bottleneck and the graphics card performance will be wasted. The 2060s is a high level among dessert-level graphics cards. It can only be said that it can be plugged in and used, but its performance will be seriously affected. Since 4090 is a piece

How to connect a Bluetooth mouse to a Windows 7 system: Make sure Bluetooth is turned on and the mouse is charged; click "Start" → "Devices and Printers"; click "Add Device"; find the Bluetooth mouse and enter the pairing code (if any); Click Next to complete the connection; move the mouse to verify the connection.

What computer should I use for graphic design? 1. - If you know how to use an Apple computer, it is best to use an Apple computer. The system is smooth and can well meet the design requirements. 2. It is recommended to use Nvidia GeForce or AMD Radeon series graphics cards. Storage device: For graphic designers, fast storage devices are very important to speed up the reading and writing of files. It is recommended to use SSD (Solid State Drive) to store operating system, application and project files. 3. The following are some common graphic design computer configurations: Processor: requires a processor with high performance, such as Intel i5 or i7, or AMD Ryzen5 or 7, etc. These processors provide enough computing power to quickly process complex image and video files. Electricians who want to design

Should old computers be installed with win7 or win10 in terms of security and user experience? Generally speaking, if your computer is more than 5 years old, then Win7 may be more suitable for you. If you pay attention to new technologies, security, and have higher hardware configuration, then Win10 may be more suitable for you. Win10 can actually be regarded as a fusion and upgraded version of Win7 and Win8. Win10 solves the embarrassment of Win8 not having a start menu. The returned start menu is very similar to Win7, and has been improved and upgraded, adding a patch function. For older computers, it is recommended to install the win10 system, which is safer and more worry-free. If you need to use some old software that does not officially support win10, it is better to install win7 system. Computer performance mainly depends on hardware. but
