10 使用phpstudy无法本地安装,中途出现#500服务器错误!

Apache 2.4.39
Mysql5.7.26
php7.3.4

其他权限,函数都检查一切都正常


第三步创建数据库时候,数据安装到一半时候,突然出现“服务器错误”提示,请看截图:

attachments-2020-11-KSsjCyQo5fa55f32a84e8.png


然后安装就停止了,也没有出现管理账号设置页面了,但是发现phpMyAdmin4.8.5里面已经有数据表了,前台也可以访问,就是后台没有管理账号登陆,这是怎么回事呢?都没有安装完成,还中途出现服务器错误,竟然这样都能访问了?

请先 登录 后评论

2 个回答

admin
擅长:ShopXO,PHP,服务器,前端

打开调试后、如果是请求接口形式出现的错误、可以参考下面是方式查看错误

1.打开chrome浏览器
2.在键盘上按F12快捷键
3.network 下勾选 XHR
4.页面执行操作,name下找到请求链接、点击一下,右侧的headers、preview、response(response信息复制出来,看看错误)
请先 登录 后评论
osir
    1. Request URL:
      http://www.shop.com/index.php?s=/install/index/add.html
    2. Request Method:
      POST
    3. Status Code:
      500 Internal Server Error
    4. Remote Address:
      127.0.0.1:80
    5. Referrer Policy:
      no-referrer-when-downgrade
  1. Response Headersview source
    1. Accept-Ranges:
      bytes
    2. Connection:
      close
    3. Content-Length:
      2590
    4. Content-Type:
      text/html
    5. Date:
      Sat, 07 Nov 2020 00:49:31 GMT
    6. ETag:
      "a1e-591a0d2623680"
    7. Last-Modified:
      Tue, 03 Sep 2019 07:13:14 GMT
    8. Server:
      Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02
  2. Request Headersview source
    1. Accept:
      application/json, text/javascript, */*; q=0.01
    2. Accept-Encoding:
      gzip, deflate
    3. Accept-Language:
      zh-CN,zh;q=0.9
    4. Connection:
      keep-alive
    5. Content-Length:
      930
    6. Content-Type:
      multipart/form-data; boundary=----WebKitFormBoundaryZtcuor2dU7LjwxXt
    7. Cookie:
      PHPSESSID=qd2i77eppkmlbtvjn7kc9vofi5; behavior_user_cookie=20201107084843479087
    8. Host:
      www.shop.com
    9. Origin:
      http://www.shop.com
    10. Referer:
      http://www.shop.com/index.php?s=/install/index/create.html
    11. User-Agent:
      Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
    12. X-Requested-With:
      XMLHttpRequest
  3. Query String Parametersview sourceview URL encoded
    1. s:
      /install/index/add.html
  4. Form Dataview sourceview URL encoded
    1. DB_TYPE:
      mysql
    2. (empty)
    3. DB_HOST:
      127.0.0.1
    4. DB_PORT:
      3306
    5. DB_NAME:
      shop
    6. DB_USER:
      shop
    7. DB_PWD:
      shopshop
    8. DB_PREFIX:
      s_
    9. DB_CHARSET:
      utf8mb4


attachments-2020-11-GgwPXOXK5fa5e5ba70fcd.png


attachments-2020-11-KZBl61LN5fa5e5c33baff.png


           <h1>HTTP 500 - Internal Server Error 服务器内部错误</h1>

        <dl>

          <dt>错误说明:服务器内部错误,无法完成请求</dt>

          <dt>原因1:伪静态规则不正确</dt>

  <dd>解决办法:</dd>

          <dd>修改伪静态。</dd>

          <dt>原因2:php版本与网站程序不兼容</dt>

  <dd>解决办法:</dd>

          <dd>更换PHP版本。</dd>

  <dt>原因3:网站无法连接至数据库</dt>

  <dd>解决办法:</dd>

          <dd>正确修改站点的数据库配置文件。</dd>

  <dt>原因4:php禁用了某一函数,需要开启</dt>

  <dd>解决办法:</dd>

          <dd>开启相关禁用函数。</dd>

  <dt>原因5:站点需要访问站外目录</dt>

  <dd>解决办法:</dd>

          <dd>关闭防跨站处理。</dd>

  <dt>原因6:源码本身有BUG</dt>

  <dd>解决办法:</dd>

          <dd>修复源码bug。</dd>

        </dl>


本地错误日志:

[Sat Nov 07 08:05:48.761719 2020] [core:warn] [pid 1248:tid 680] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:05:48.766716 2020] [mpm_winnt:notice] [pid 1248:tid 680] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:05:48.766716 2020] [mpm_winnt:notice] [pid 1248:tid 680] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:05:48.766716 2020] [core:notice] [pid 1248:tid 680] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:05:48.781708 2020] [mpm_winnt:notice] [pid 1248:tid 680] AH00418: Parent: Created child process 876

[Sat Nov 07 08:05:51.191339 2020] [mpm_winnt:notice] [pid 876:tid 704] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:18:27.099849 2020] [core:warn] [pid 9916:tid 636] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:18:27.104846 2020] [mpm_winnt:notice] [pid 9916:tid 636] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:18:27.104846 2020] [mpm_winnt:notice] [pid 9916:tid 636] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:18:27.104846 2020] [core:notice] [pid 9916:tid 636] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:18:27.116840 2020] [mpm_winnt:notice] [pid 9916:tid 636] AH00418: Parent: Created child process 9352

[Sat Nov 07 08:18:29.078149 2020] [mpm_winnt:notice] [pid 9352:tid 724] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:19:11.234534 2020] [core:warn] [pid 6556:tid 660] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:19:11.239534 2020] [mpm_winnt:notice] [pid 6556:tid 660] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:19:11.239534 2020] [mpm_winnt:notice] [pid 6556:tid 660] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:19:11.239534 2020] [core:notice] [pid 6556:tid 660] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:19:11.253523 2020] [mpm_winnt:notice] [pid 6556:tid 660] AH00418: Parent: Created child process 7164

[Sat Nov 07 08:19:13.376503 2020] [mpm_winnt:notice] [pid 7164:tid 748] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:20:15.999154 2020] [core:warn] [pid 12764:tid 640] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:20:16.013145 2020] [mpm_winnt:notice] [pid 12764:tid 640] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:20:16.014145 2020] [mpm_winnt:notice] [pid 12764:tid 640] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:20:16.014145 2020] [core:notice] [pid 12764:tid 640] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:20:16.038141 2020] [mpm_winnt:notice] [pid 12764:tid 640] AH00418: Parent: Created child process 2324

[Sat Nov 07 08:20:18.220156 2020] [mpm_winnt:notice] [pid 2324:tid 700] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:30:33.583738 2020] [core:warn] [pid 13812:tid 176] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:30:33.594720 2020] [mpm_winnt:notice] [pid 13812:tid 176] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:30:33.594720 2020] [mpm_winnt:notice] [pid 13812:tid 176] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:30:33.594720 2020] [core:notice] [pid 13812:tid 176] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:30:33.615718 2020] [mpm_winnt:notice] [pid 13812:tid 176] AH00418: Parent: Created child process 9528

[Sat Nov 07 08:30:36.530976 2020] [mpm_winnt:notice] [pid 9528:tid 724] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:35:20.448356 2020] [core:warn] [pid 9564:tid 668] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:35:20.453353 2020] [mpm_winnt:notice] [pid 9564:tid 668] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:35:20.453353 2020] [mpm_winnt:notice] [pid 9564:tid 668] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:35:20.453353 2020] [core:notice] [pid 9564:tid 668] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:35:20.466347 2020] [mpm_winnt:notice] [pid 9564:tid 668] AH00418: Parent: Created child process 12480

[Sat Nov 07 08:35:22.519690 2020] [mpm_winnt:notice] [pid 12480:tid 760] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:39:40.795530 2020] [core:warn] [pid 6628:tid 688] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:39:40.800519 2020] [mpm_winnt:notice] [pid 6628:tid 688] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:39:40.800519 2020] [mpm_winnt:notice] [pid 6628:tid 688] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:39:40.800519 2020] [core:notice] [pid 6628:tid 688] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:39:40.813511 2020] [mpm_winnt:notice] [pid 6628:tid 688] AH00418: Parent: Created child process 7176

[Sat Nov 07 08:39:43.447408 2020] [mpm_winnt:notice] [pid 7176:tid 712] AH00354: Child: Starting 1024 worker threads.

[Sat Nov 07 08:45:48.343187 2020] [core:warn] [pid 1412:tid 656] AH00098: pid file D:/phpstudy_pro/Extensions/Apache2.4.39/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Sat Nov 07 08:45:48.373168 2020] [mpm_winnt:notice] [pid 1412:tid 656] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02 configured -- resuming normal operations

[Sat Nov 07 08:45:48.437267 2020] [mpm_winnt:notice] [pid 1412:tid 656] AH00456: Server built: Mar 27 2019 11:06:20

[Sat Nov 07 08:45:48.437267 2020] [core:notice] [pid 1412:tid 656] AH00094: Command line: 'D:\\phpstudy_pro\\COM\\..\\Extensions\\Apache2.4.39\\\\bin\\httpd.exe -d D:/phpstudy_pro/Extensions/Apache2.4.39'

[Sat Nov 07 08:45:48.466250 2020] [mpm_winnt:notice] [pid 1412:tid 656] AH00418: Parent: Created child process 11796

[Sat Nov 07 08:45:50.752284 2020] [mpm_winnt:notice] [pid 11796:tid 788] AH00354: Child: Starting 1024 worker threads.



尝试服务器数据库地址127.0.0.1、127.0.0.88(程序安装的端口)都不行,无论怎么是本地IP安装,还是域名形式安装都不行

请先 登录 后评论
  • 2 关注
  • 0 收藏,96 浏览
  • osir 提出于 2020-11-06 22:39

相似问题