Jump to content

Premature end of script headers: api.php

Recommended Posts

Restored a backup to a different mySQL server and updated all appropriate config options.


All works great except api access. We are able to send emails, but right after get a 500 Internal Server error.

Looking in the logs we see the message "Premature end of script headers: api.php"


No error logs on the mySQL server, and everything is recorded properly etc.


As stated all works fine except for the 500 error page.


Any ideas??

Link to comment
Share on other sites

Thanks for the note, but the files were not touched and now continue to work properly with the data back on the localhost.


We were in the process of moving the install, and decided to move the data first. So the (local) data was backed up and restored to a different server. The configuration was updated to point to this new data location.


We've since moved the data back to the local system, and the errors have gone away.


So it has something to do with the other MySQL server or the moving of the data. Seems odd since the error is not a database one, but an api.php (as listed) one. There is no other error message on any of the systems.


WHMCS works fine other than when it is making API calls.


WHMCS: Version: 5.0.3

MySQL (local): 5.0.95-community (pc-linux-gnu)

MySQL (other): 5.5.15 (Win32)

Edited by robin
added versions
Link to comment
Share on other sites

Have you locked the API access down by IP and not included the new/old server IP addresses in the list ?


Seems strange that the "database server" would be affected by that. That should only come into play if they moved an external script that uses the API to another IP.


I would check any custom code you have to make sure you arent hardcoding the database connection somewhere, and also turn on display_errors to see if its returning anything.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated