新版的hprose在nginx+php-fpm的環境下,會出現error500
@andot 你好,想跟你请教个问题:
新版的hprose,我在nginx+php-fpm下執行會出現500錯。
舊版在執行上沒有這個問題。
系統版本:
Centos6.6
nginx1.8.0
php 5.5.24
log檔的錯誤訊息:
2015/05/05 06:19:17 [error] 20080#0: *495 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseService' not found in /var/www/html/Service.php on line 24" while reading response header from up stream, client: 59.127.132.128, server: mydomain.com, request: "GET /MemberAdmin/mis_api.php HTTP/1.1", upstream: "fastcgi://u nix:/var/lib/php5-fpm/web2.sock:", host: "mydomain.com" 2015/05/05 06:19:19 [error] 20080#0: *497 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseService' not found in /var/www/html/Service.php on line 24" while reading response header from up stream, client: 59.127.132.128, server: mydomain.com, request: "GET /MemberAdmin/mis_api.php HTTP/1.1", upstream: "fastcgi://u nix:/var/lib/php5-fpm/web2.sock:", host: "mydomain.com" 2015/05/05 06:21:01 [error] 20080#0: *525 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseService' not found in /var/www/html/Service.php on line 24" while reading response header from up stream, client: 59.127.132.128, server: mydomain.com, request: "GET /MemberAdmin/mis_api.php HTTP/1.1", upstream: "fastcgi://u nix:/var/lib/php5-fpm/web2.sock:", host: "mydomain.com" 2015/05/05 06:23:19 [error] 20080#0: *531 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseClient' not found in /var/www/clients/client0/web2/web/api/Hprose/Http/Client.php on line 23" while reading response header from upstream, client: 5 9.127.132.168, server: mydomain.com, request: "GET /api/test.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web2.s ock:", host: "mydomain.com" 2015/05/05 06:26:11 [error] 20080#0: *569 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseClient' not found in /var/www/clients/client0/web2/web/api/Hprose/Http/Client.php on line 23" while reading response header from upstream, client: 5 9.127.132.168, server: mydomain.com, request: "GET /api/test.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web2.s ock:", host: "mydomain.com" 2015/05/05 06:26:43 [error] 20080#0: *580 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseService' not found in /var/www/html/Service.php on line 24" while reading response header from up stream, client: 59.127.132.128, server: mydomain.com, request: "GET /MemberAdmin/mis_api.php HTTP/1.1", upstream: "fastcgi://u nix:/var/lib/php5-fpm/web2.sock:", host: "mydomain.com" 2015/05/05 06:31:37 [error] 20080#0: *605 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'HproseClient' not found in /var/www/clients/client0/web2/web/api/Hprose/Http/Client.php on line 23" while reading response header from upstream, client: 5 9.127.132.168, server: mydomain.com, request: "GET /api/test.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/web2.s ock:", host: "mydomain.com"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这个问题已经解决了,是 spl_autoload 在 linux 下,只能加载小写字母的文件名造成的。新版本用 include 替换了 spl_autoload,不会再有这个问题了。
我更新了,仍有下列錯誤。
你重新下载一下新版本试试看,我今晚刚刚更新了一下。重写了 Hprose.php。
这错误看上去是程序里没有 include Hprose 的主文件。