0

Trying to do a couple updates on an older project that works fine on the production server, but locally throws a 500 error when I try to hit my RESTful end-points. I've got logging on and nothing shows up in the logs, so I checked Apache errors of which there are none, and their is only an access.log error of:

"POST /user/login HTTP/1.1" 500 1176

I found these two posts 1 and 2 that seem to have the same symptoms, but I've already got error logging on in php.ini, and I did a replace of all @ before reverting using GIT and it didn't help either.

I can hit the end-point directly by entering the routes URL directly into the browser and it does hit my controller, before failing, which it should.

It doesn't appear to be a HTTP versus HTTPS issue, as the base_url has been configured correctly for both dev and prod domains in CodeIgniter.

So to sum up I can't POST, but I can GET my end-point, there are no errors being logged except in access.log, and I'm using CodeIgniter 2 and AngularJS on the front-end to perform my AJAX. This just started happening locally for no reason that I can gleam, and on the production server it runs no problem and has been for about two months now.

Anyone have this happen and know how to find out where the error is occurring?

The factory that contains the POST looks like this:

.factory('AuthService', ['$http', '$q', 'UserService', 
    function( $http, $q, UserService ) {

        var user = UserService;

        var service = {

            login: function( user ) {
                return $http.post( '/user/login', user )

                    .then(function( session ) {
                        UserService.set( session.data );
                        return session;
                    }, function( error ) {
                        return $q.reject( error );
                    });
            }

        };

    return service;
}]);
Community
  • 1
  • 1
mtpultz
  • 17,267
  • 22
  • 122
  • 201

0 Answers0