微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

尝试在 xampp 中更新我的 php 现在我不断收到此错误

如何解决尝试在 xampp 中更新我的 php 现在我不断收到此错误

我在本地主机上运行一个网站试图将我的 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 举报,一经查实,本站将立刻删除。