Prestashop 网络服务:<![CDATA[内部错误。要查看此错误,请显示 PHP 个错误。]]>

Prestashop web service: <![CDATA[Internal error. To see this error please display the PHP errors.]]>

这次通话

curl -H "Content-type: application/xml" -vX POST 'http://blablablabla@local.acme.net/api/products/' -d "<?xml version=\"1.0\" 
encoding=\"UTF-8\"?>
<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">
<product>
</product>
</prestashop>"

总是returns

< HTTP/1.1 400 Bad Request
< Date: Wed, 14 Sep 2016 14:26:02 GMT
< Server: Apache/2.4.18 (Unix) PHP/5.5.34
< Vary: Authorization
< X-Powered-By: PrestaShop Webservice
< Access-Time: 1473863162
< PSWS-Version: 1.6.1.7
< Execution-Time: 0.024
< Content-Length: 241
< Connection: close
< Content-Type: text/xml;charset=utf-8
<
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<message><![CDATA[Internal error. To see this error please display the PHP errors.]]></message>
</error>
</errors>
</prestashop>
* Closing connection 0

但是php日志不包含关于这个错误的内容。发生了什么?我该如何解决这个问题?

config/defines.inc.php 中将常量更改为:

define('_PS_MODE_DEV_', true);

您将在正文中收到预期的错误消息:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[41]]></code>
<message><![CDATA[parameter "price" required]]></message>
</error>
</errors>
</prestashop>