Thanks Peter.I figured out what the issue was.I looked at the error logs and found out that the server couldn't handle PHP short array syntax [ ] since the PHP version running on the server was < 5.4.xIt wasn't possible to upgrade the PHP version so I opted to change the [ ] declarations to array().Regards,AllanOn Wed, May 20, 2015 at 9:38 PM, Peter Karunyu <pkarunyu@gmail.com> wrote:Hey Allan,I am running the exact same library, and its working great!If the API works fine from your dev machine, but not from your production server, then the problem is conceivably NOT your code.Check if the PHP versions between the two environments are the same.Check the apache and php error logs on the server to see if there are any interesting errors there.If nothing, ping me and we can walk through the processOn Wed, May 20, 2015 at 8:39 PM, Allan O. via skunkworks <skunkworks@lists.my.co.ke> wrote:_______________________________________________Hi,I have implemented the Codeigniter Rest Server as described in numerous tutorials.I can make requests like http://localhost/folder/api/controller/postfunction and get a JSON response.The issue is when I host the files on a different server.Making a request like http://server_ip/api/controller/postfunction I get the response as status 0 with the message Empty reply from server.After combing StackOverflow, I understand that the issue could be as a result of the request timing out or being cancelled before a response was received.But when I access http://server_ip/api/ I get 404 from Codeigniter. Which is okay. The issue arises when I access the controller file Controller.php i.e. http://server_ip/api/controller/Any thoughts on how to go about resolving this?NB: the Controller.php has this line of coderequire APPPATH.'/libraries/REST_Controller.php';Could this be a source of the issue?Regards,
Allan
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke