1

I created a services endpoint but any time I access the REST URL, e.g. http://www.mysite.com/endpoint I get a WSOD and the following in the firebug console:

"NetworkError: 500 Internal Server Error"

No errors in the dblog. No errors in the apache error log.

The site is hosted on aegir. So as a troubleshooting step I moved the entire drupal files and database to my local machine, hoping that I could step through with a debugger. Guess what, everything works fine!

I've tried uninstalling modules one by one - no luck

I've tried with a clean drupal install on aegir - same 500 error

I'm wondering if anyone can suggest any further troubleshooting steps?

It seems that it could be something to do with the server or aegir configuration.

4
  • 1
    Maybe because you're contacting an endpoint without requesting a resource? Do you get a 500 for http://www.mysite.com/endpoint/user/login, for example (assuming of course you have that resource enabled)?
    – Clive
    Commented Jul 22, 2013 at 15:14
  • Same problem at http://www.mysite.com/endpoint/node - 500 error, resource is enabled. Usually Services gives a message saying "This endpoint has been setup correctly" when contacting http://www.mysite.com/endpoint but getting 500 error and no success message. Commented Jul 22, 2013 at 16:02
  • 1
    Hmm strange that it works locally, definitely points to some sort of server config issue. Are you using session authentication, and if so are you including the CSRF token header as part of the request? It's been required since v3.4 and caused me a couple of issues very recently
    – Clive
    Commented Jul 22, 2013 at 16:48
  • No session authentication is turned on. It's got me stumped! Commented Jul 22, 2013 at 17:16

1 Answer 1

2

The problem turned out to be the PHP version on the server. The Rest Server had a line of code that requires PHP 5.3.

There is an issue at https://drupal.org/node/2003396 and a patch at https://drupal.org/files/ServicesRESTServerFactory.inc_.patch

Installing the patch solved the problem without the need to upgrade the php version on the server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.