问题:xampp Portable 无法启动、失败或无法正常工作!
Error: Apache shutdown unexpectedly.
[Apache] This may be due to a blocked port, missing dependencies,
[Apache] improper privileges, a crash, or a shutdown by another method.
[Apache] Press the Logs button to view error logs and check... ...
解决方案:
选项 2
第 1 步:从 xampp 控制面板打开 Apache“httpd.conf”。该文件将在记事本中打开。
image-xampp-config
第 2 步:向下滚动或搜索“ServerRoot”。如果结果 => ServerRoot "/xampp/apache",请执行下一步。如果不遵循(选项 2)
image-xammp-ServerRoot
如果 'httpd.conf' 不喜欢这张图片,请遵循#Option 2
第 3 步: 对于便携式版本的 xampp,请勿使用任何其他文件夹名称,例如“xampp56”
仅使用“xampp”并将其放在根目录。
没有子文件夹/目录
第 4 步:打开您的 USB 驱动器并转到 xampp 文件夹,然后以“以管理员身份运行”模式启动 xampp-control-panel。
完成。
选项 2
第 1 步:打开“我的电脑”或“这台电脑”以确认您当前电脑上的 USB 驱动器标签。 E:, F:, G:…
第 2 步:从 xampp 控制面板打开 Apache“httpd.conf”。该文件将在记事本中打开。现在向下滚动或搜索“ServerRoot”
image-changing-file-httpd
第3步:如果路径与当前PC不匹配,则ServerRoot后的文件地址路径应更改为您当前的USB驱动器地址路径。
image-notepade-replace-function
第 4 步:对 Apache 'httpd-ssl.conf'、'httpd-xampp.conf' 重复相同的过程,
'php.ini'(请注意php使用反斜杠“\”而不是正斜杠“/”)
image-php-ini-config-update
和
{...你的 USB...}\xampp\apache\conf\extra\
文件名:'httpd-autoindex.conf'、'httpd-multilang-errordoc.conf'。
注意:如果 xampp Portable Apache "httpd.conf" 像选项 2 你必须每次都重复这个过程。我建议你下载新版本的'xampp-portable-win32-... .zip'。
Otherwise total of 7 files need to be updated everytime you change
PC!! Apache ('httpd.conf', 'httpd-ssl.conf', 'httpd-xamp.conf')
'php.ini', 'my.ini', 'httpd-autoindex.conf',
'httpd-multilang-errordoc.conf'
第 5 步:打开您的 USB 驱动器并转到 xampp 文件夹,然后以“以管理员身份运行”模式启动 xampp-control-panel。
完成。