douzhong5902 2015-11-06 01:49
浏览 40
已采纳

上传到主机后Codeigniter rest server 500错误

My codeigniter 3 application uses rest server. My application is working locally and when i uploaded application works except post end points of rest server routes gives 500 error but nothing on error log file.

Server uses

PHP 5.3.28 (cli) (built: Dec 17 2013 00:28:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

and server is Linux 3.2.28-45.63.amzn1.x86_64 x86_64

I use 5.3 in my ampps setup. In local setup everything works fine.

routes files has custom routes

$route['api/subscription/notify'] = 'api/subscription/notify'; 
$route['api/ussd/receiver'] = 'api/ussd/receiver';

Add Subscription.php and USSD resides in api folder inside controllers folder.

I use .htaccess file to remove index.php from URLS.

it's

RewriteEngine on

RewriteCond $1 !^(index\.php|assets|imapp|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]

And

$config['index_page'] = '';

Is set like this in config.php

  • 写回答

1条回答 默认 最新

  • duangelin7513 2015-11-06 19:20
    关注

    I finally found the error. Rest Server is needed PHP5.4 or higher since it uses ne array [] format. So help of some other repo in Github I was able to make it compatible with PHP 5.3.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据