I'm using themosis – a framework for wordpress that works pretty well. Also I use WP-API - that doesn't work so great.
All versions are the latest stables and the Server is using PHP 5.5
On calling that API route:
posts?filter[order]=ASC&filter[orderby]=name&filter[posts_per_page]=-1&type=products
I'm getting an Internal Server error / HTTP 500
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@example.ch and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
So my hoster checked the logs and the only lines caused by this error were:
[Tue Jul 07 17:43:13 2015] [error] Premature end of script headers: php55-fcgi-starter.fcgi, referer: {myurl/mypath}
I checked all log, forced everything to display errors & logs, but no PHP errors - not even notices... (set display_errors
to On
and error_reporting
to 2039
- with htaccess and php-side (wordpress index.php)
I just figured out that when I set the post_per_page
filter is set to e.g. 90 it works, but only till a specific post.
All posts are "normal" - making a WP_Query
also delivers all results without any issues.
I also increased the php memory_limit to more than enough and tested it locally (Mac OS / MAMP) what works great.
I really can't find any reason why this is happening. My server hoster support (which is really good actually) says also that all systems run fine