windows server 2012 下 PHP7 & MYSQL5.7.1 的配置问题

sosoben 2017-04-06 02:00:41
本人用PHP7 & MYSQL5.7.1 环境构建 一个基于php的小型内部网站
在个人电脑上 (win7 32位) 用nginx-1.10.3 构建成功,运行phpmyadmin和一些开源php网页都没什么问题。
但是搬到服务器上(windows server 2012 64位),无论是用nginx-1.10.3 还是IIS8 、php和mysql用32位和64位都试过了,现象还是如下:
phpmyadmin能运行成功,能查找修改mysql数据库,但其他开源php就是不行,加载一阵后显示500错误。

PS:已装rewrite module 2.0 ,VC++ 2015 redistributable X64与X86


请教各位高手,是什么原因,有什么需要提供的我后面再提供,开源php我是在开源中国找的pescms-team,在本地调试正常啊
...全文
617 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sosoben 2017-04-07
  • 打赏
  • 举报
回复
引用 5 楼 sosoben 的回复:
[quote=引用 4 楼 Runnerchin 的回复:] 错误已经很明显了,直接检查E:\wnmp\nginx-1.10.3\html\Team\Core\Abnormal\Error.class.php这个文件的第33行,这一步执行超时了
这个程序本身就是个错误处理机制,所以真正错误不应该在这里发生,但现在错误记录在这了,导致我找不到真正发生错误的位置。 而且这程序不是我编,正在使劲看代码。 但奇怪的是我在本机win7下是可以正常运行的啊[/quote] 唉,查了半天代码,删了错误处理的函数,终于定位到真正发生问题的地方了,原来程序会由服务器端向外网请求一个地址,而我的服务器是不能连外网的,导致超时。这样的设计真是蛋疼啊!!
sosoben 2017-04-07
  • 打赏
  • 举报
回复
引用 4 楼 Runnerchin 的回复:
错误已经很明显了,直接检查E:\wnmp\nginx-1.10.3\html\Team\Core\Abnormal\Error.class.php这个文件的第33行,这一步执行超时了
这个程序本身就是个错误处理机制,所以真正错误不应该在这里发生,但现在错误记录在这了,导致我找不到真正发生错误的位置。 而且这程序不是我编,正在使劲看代码。 但奇怪的是我在本机win7下是可以正常运行的啊
X-i-n 2017-04-06
  • 打赏
  • 举报
回复
错误已经很明显了,直接检查E:\wnmp\nginx-1.10.3\html\Team\Core\Abnormal\Error.class.php这个文件的第33行,这一步执行超时了
sosoben 2017-04-06
  • 打赏
  • 举报
回复
引用 1 楼 Runnerchin 的回复:
500错误一般都是程序出错,如果在别的地方这个项目可以跑起来,可以考虑是php版本的问题 另外,碰到500的时候,测试阶段和开发阶段打开php的错误显示,这样能在页面里直接看到错误的问题详情,而不是一个笼统的500页面;在任何阶段,也可以通过操作系统的日志去查看错误详情(打开和关闭php的错误提示都不影响),windows在日志查看器的程序标签下查看,linux一般在web服务器的日志里查看
; Common Values:
;   E_ALL (Show all errors, warnings and notices including coding standards.)
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = On

; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. PHP's default behavior is to suppress those
; errors from clients. Turning the display of startup errors on can be useful in
; debugging configuration problems. We strongly recommend you
; set this to 'off' for production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off
; http://php.net/display-startup-errors
display_startup_errors = On

; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
; http://php.net/log-errors
log_errors = On
sosoben 2017-04-06
  • 打赏
  • 举报
回复
引用 1 楼 Runnerchin 的回复:
500错误一般都是程序出错,如果在别的地方这个项目可以跑起来,可以考虑是php版本的问题 另外,碰到500的时候,测试阶段和开发阶段打开php的错误显示,这样能在页面里直接看到错误的问题详情,而不是一个笼统的500页面;在任何阶段,也可以通过操作系统的日志去查看错误详情(打开和关闭php的错误提示都不影响),windows在日志查看器的程序标签下查看,linux一般在web服务器的日志里查看
我在php.ini已经是这样设置的了 error_reporting: E_ALL display_errors: On 但是没看到有什么详细信息,操作系统也没看到有什么有用的错误信息,php程序本身的log文件写的是 [color=#CCFFFF]Date:2017-04-06 14:29:10 Timestamp:1491460150 Rank[1] PHP error: Maximum execution time of 30 seconds exceeded File:E:\wnmp\nginx-1.10.3\html\Team\Core\Abnormal\Error.class.php;Line:33[/color]
X-i-n 2017-04-06
  • 打赏
  • 举报
回复
500错误一般都是程序出错,如果在别的地方这个项目可以跑起来,可以考虑是php版本的问题 另外,碰到500的时候,测试阶段和开发阶段打开php的错误显示,这样能在页面里直接看到错误的问题详情,而不是一个笼统的500页面;在任何阶段,也可以通过操作系统的日志去查看错误详情(打开和关闭php的错误提示都不影响),windows在日志查看器的程序标签下查看,linux一般在web服务器的日志里查看

6,868

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧