问题描述
我在本地主机上运行一个网站试图将我的 PHP 版本更新为 PHP8 64 位,所以我首先遵循了本指南:https://www.wpblog.com/update-php-version-in-xampp/#1
但最后我得到了这个错误:
23:22:13 [Apache] Attempting to start Apache app...
23:22:13 [Apache] Status change detected: running
23:22:14 [Apache] Status change detected: stopped
23:22:14 [Apache] Error: Apache shutdown unexpectedly.
23:22:14 [Apache] This may be due to a blocked port,missing dependencies,23:22:14 [Apache] improper privileges,a crash,or a shutdown by another method.
23:22:14 [Apache] Press the Logs button to view error logs and check
23:22:14 [Apache] the Windows Event Viewer for more clues
23:22:14 [Apache] If you need more help,copy and post this
23:22:14 [Apache] entire log window on the forums
然后我搜索了一个类似的主题,可能有一些 awnsers,例如: How to install PHP 8 on XAMPP
不幸的是,这也无法修复它:(
这是我的httpd-xampp.conf
#
# XAMPP settings
#
<IfModule env_module>
SetEnv MIBDirs "C:/xampp/PHP/extras/mibs"
SetEnv MysqL_HOME "\\xampp\\MysqL\\bin"
SetEnv OPENSSL_CONF "C:/xampp/apache/bin/openssl.cnf"
SetEnv PHP_PEAR_SYSCONF_DIR "\\xampp\\PHP"
SetEnv PHPRC "\\xampp\\PHP"
SetEnv TMP "\\xampp\\tmp"
</IfModule>
#
# PHP-Module setup
#
LoadFile "C:/xampp/PHP/PHP8ts.dll"
LoadFile "C:/xampp/PHP/libpq.dll"
LoadModule PHP8_module "C:/xampp/PHP/PHP8apache2_4.dll"
<FilesMatch "\.PHP$">
SetHandler application/x-httpd-PHP
</FilesMatch>
<FilesMatch "\.PHPs$">
SetHandler application/x-httpd-PHP-source
</FilesMatch>
#
# php-cgi setup
#
#<FilesMatch "\.PHP$">
# SetHandler application/x-httpd-php-cgi
#</FilesMatch>
#<IfModule actions_module>
# Action application/x-httpd-php-cgi "/php-cgi/php-cgi.exe"
#</IfModule>
<IfModule PHP8_module>
PHPINIDir "C:/xampp/PHP"
</IfModule>
<IfModule mime_module>
AddType text/html .PHP .PHPs
</IfModule>
ScriptAlias /php-cgi/ "C:/xampp/PHP/"
<Directory "C:/xampp/PHP">
AllowOverride None
Options None
Require all denied
<Files "php-cgi.exe">
Require all granted
</Files>
</Directory>
<Directory "C:/xampp/cgi-bin">
<FilesMatch "\.PHP$">
SetHandler cgi-script
</FilesMatch>
<FilesMatch "\.PHPs$">
SetHandler None
</FilesMatch>
</Directory>
<Directory "C:/xampp/htdocs/xampp">
<IfModule PHP8_module>
<Files "status.PHP">
PHP_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
</Directory>
<IfModule alias_module>
Alias /licenses "C:/xampp/licenses/"
<Directory "C:/xampp/licenses">
Options +Indexes
<IfModule autoindex_color_module>
DirectoryIndexTextColor "#000000"
DirectoryIndexBGColor "#f8e8a0"
DirectoryIndexLinkColor "#bb3902"
DirectoryIndexVLinkColor "#bb3902"
DirectoryIndexALinkColor "#bb3902"
</IfModule>
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Alias /PHPmyadmin "C:/xampp/PHPMyAdmin/"
<Directory "C:/xampp/PHPMyAdmin">
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
Alias /webalizer "C:/xampp/webalizer/"
<Directory "C:/xampp/webalizer">
<IfModule PHP_module>
<Files "webalizer.PHP">
PHP_admin_flag safe_mode off
</Files>
</IfModule>
AllowOverride AuthConfig
Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
</IfModule>
我尝试将 PHP8_module
重写为 PHP_module
但这没有效果。
我真的不知道现在还能做什么,请帮忙:(
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)