我以前安裝過xampp,因爲學習thingPHP需要升級PHP5.0以上,所以我就卸掉了xampp,從新安裝新版本的xampp其中PHP是最新版的,但是安裝後啓動xampp提示如下:
Apache Service detected with wrong path.Change XAMPP Apache and Control Panel settings orUninstall/disable the other service manually first
Found Path: "H:\program files\xampp\apache\bin\httpd.exe" -k runservice
Expected Path: "h:\xampp\apache\bin\httpd.exe" -k runservice
還好沒有出現端口被佔用的情況,這是啓動路徑出現了錯誤,Found Path: "H:\program files\xampp\apache\bin\httpd.exe" -k runservice這個是我以前老版本安裝的路徑,"h:\xampp\apache\bin\httpd.exe" -k runservice這個纔是我現在安裝的路徑,如何修改咧?
首先,檢查一下自己的環境變量的path中是否還殘留以前自己添加的xampp路徑,如果有就刪掉,如果沒有就進行下一步。
然後就要進入自己的註冊表:win+r打開運行對話框--->輸入regedit回車,進入註冊表--->點擊HKEY_LOCAL_MACHINE---->SYSTEM---->currentControlSet---->Services---->找到Apache2.4,你就會在右邊款到
ImagePath看看那個路徑是不是以前那個版本的路徑,如果是就選中ImagePath點擊右鍵修改,把xampp裏面提示的Expected Path後面的路徑粘貼進去,然後確定。
最後,重啓xampp就可以了,啓動apache.如果你的mysql,filezilla也出現路徑問題,也可以按上面的方法修改。