Different results when retrieving data from different environments [duplicate]

主宰稳场 提交于 2019-12-11 20:21:22

问题


I've completed a project in my local environment running Windows 10. The production server on Debian OS

I encountered an issue. Despite both my local env and prod env being run on the same Cakephp version, version 3.1.4, the same Cakephp database query

 $this->Articles->find()->contain('ArticleComments'); 

is returning two different results from an identical data stored in two different environments.

attached an image which contains both results.

Any idea what could be the problem? From Cakephp point of view configuration is set correctly. In my local env the application and database queries are running smoothly.

Image:


回答1:


You probably have an older PHP version on your Debian Server, one that doesn't yet support the magic __debugInfo() method (available as of PHP 5.6.0), which is used by Cakes Query class to decorate the debug output with custom information.

If you'd use Cakes debug() function you should get identical results (AFAIR).

See also

  • http://php.net/manual/en/language.oop5.magic.php#object.debuginfo
  • Source > \Cake\ORM\Query::__debugInfo()


来源:https://stackoverflow.com/questions/33963983/different-results-when-retrieving-data-from-different-environments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!