I get the following error when accessing the API on my local MediaWiki: "API must be accessed through the primary script entry point." even when the API is accessed through its primary script entry point, but only when a query string is appended.
From line 57:
$strcmp( "$wgScriptPath/api$wgScriptExtension", $url ): -65
PHP Version 5.2.5 is running as FastCGI.
I wonder why strcmp is used as comparison. According to the PHP docs strcmp will only return 0 if the strings are equal, in which case === can be used.