Title: can&#039;t fetch post
Last modified: August 24, 2016

---

# can't fetch post

 *  Resolved [akehat](https://wordpress.org/support/users/akehat/)
 * (@akehat)
 * [11 years ago](https://wordpress.org/support/topic/cant-fetch-post/)
 * [http://breaking911.com/api/get_recent_posts/](http://breaking911.com/api/get_recent_posts/)–
   works.
 * Using one of the post_id’s
    [http://breaking911.com/api/get_post/?post_id=37531](http://breaking911.com/api/get_post/?post_id=37531)
 * doesn’t work, I get back:
 * {
    status: “error”, error: “Include ‘id’ or ‘slug’ var in your request.” }
 * Which I am using…
 * BTW – this started happening only after moving the site to a new server.
 * Thanks
 * [https://wordpress.org/plugins/json-api/](https://wordpress.org/plugins/json-api/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [akehat](https://wordpress.org/support/users/akehat/)
 * (@akehat)
 * [11 years ago](https://wordpress.org/support/topic/cant-fetch-post/#post-6172182)
 * after a little research – it is failing in:
    singletons/introspector.php::get_current_post()
 * b/c the $_GET is empty…
 * why?
    Are there any known plugin conflicts?
 *  Thread Starter [akehat](https://wordpress.org/support/users/akehat/)
 * (@akehat)
 * [11 years ago](https://wordpress.org/support/topic/cant-fetch-post/#post-6172191)
 * Another important factor – the server is running lighttpd (not apache).
 *  Thread Starter [akehat](https://wordpress.org/support/users/akehat/)
 * (@akehat)
 * [11 years ago](https://wordpress.org/support/topic/cant-fetch-post/#post-6172336)
 * solution is adding this code to the beggining of index.php:
 *     ```
       $question_pos = strpos($_SERVER['REQUEST_URI'], '?');
       if ($question_pos !== false) {
               $question_pos++; // don't want the ?
               $query = substr($_SERVER['REQUEST_URI'], $question_pos);
               parse_str($query, $_GET);
       }
       ```
   
 * source:
    ​https://thomashunter.name/blog/wordpress-get-variables-with-lighttpd/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘can't fetch post’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [json](https://wordpress.org/support/topic-tag/json/)

 * 3 replies
 * 1 participant
 * Last reply from: [akehat](https://wordpress.org/support/users/akehat/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/cant-fetch-post/#post-6172336)
 * Status: resolved