Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 views
in Technique[技术] by (71.8m points)

php - Trouble with Apache in Xampp after multiple Apache installs

I've been trying to install php, apache, and mySQL in a working fashion for some time now. After attempting manually several times and hitting roadblocks, I ended up just trying to use Xampp.

However, upon startup, the program says:

2:18:39 PM  [main]  Running with Administrator rights - good!
2:18:39 PM  [main]  XAMPP Installation Directory: "c:xampp"
2:18:39 PM  [main]  Checking for prerequisites
2:18:39 PM  [main]  All prerequisites found
2:18:39 PM  [main]  Initializing Modules
2:18:39 PM  [Apache]    Apache Service detected with wrong path
2:18:39 PM  [Apache]    Change XAMPP Apache and Control Panel settings or
2:18:39 PM  [Apache]    Uninstall/disable the other service manually first
2:18:39 PM  [Apache]    Found Path: "C:Apache24inhttpd.exe" -k runservice
2:18:39 PM  [Apache]    Expected Path: "c:xamppapacheinhttpd.exe" -k runservice

I followed the suggestions here, but

(a) Changing the port Listen 80 to Listen *:80 or Listen 81 had no effect.

(b) using netstat -ao, there were no local addresses ending with 80.

I've also tried deleting any files related to apache, mysql, and php not in the xampp folder, which were left over from previous install attempts.

Tried xampp 1.8.2, uninstalled, tried 1.8.3, same issue.

For what I can guess, I must've changed some code somewhere outside Xampp before I installed it, and now it is executing when apache is run, changing the path from what Xampp wants (Expected Path: "c:xamppapacheinhttpd.exe" -k runservice) to a path to the now deleted folder C:Apache24in. However, I don"t know where this code might be!

I tried searching my whole C drive for C:Apache24in, but the search came up empty.

Machine: Windows 7 64 bit

Previously installed/uninstalled: Apache2.2, Apache2.4, php5.5.4, MySQL using MySQL Installer 5.6

tried xampp for windows 1.8.2

xampp for windows 1.8.3 currently installed.

Any help?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The reason to get this error is because you had Apache installed once before and its service is still running.

If you are using windows 7, click on start and type "services". Open Services and see if Apache is listed. If yes, double click on it to see its properties. Copy the service name (e.g Apache 2.4) by selecting it -> right click -> selecting Copy.

Close the services window.

Click on start and find cmd by typing it. Right click on cmd.exe and select "Run as administrator".

When the cmd window has opened type this command and press Enter:

note: instead of Apache 2.4 you should right click on the window to select paste

sc delete "Apache 2.4"

After pressing enter you should get the message: serviceDelete Success

Open services windows again (I explained it above) and see if you have Apache there again or not.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...