[英]dev environment returns blank page
我正在研究一個Symfony項目(const VERSION ='2.5.0'),我正在使用xampp和PHP 5.6.3。
當我在開發環境中運行時,它會顯示一個空白頁面,但每當我在prod環境中運行應用程序時,一切正常。
這是php_error_log:
[06-May-2015 04:59:03 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector.php on line 134
[06-May-2015 05:02:38 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in C:\xampp\htdocs\Editracker\app\bootstrap.php.cache on line 956
[06-May-2015 05:06:29 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector.php on line 176
[06-May-2015 05:06:48 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector.php on line 176
[06-May-2015 05:11:36 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24 bytes) in C:\xampp\htdocs\Editracker\vendor\monolog\monolog\src\Monolog\Formatter\LineFormatter.php on line 111
[06-May-2015 05:34:34 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5 bytes) in C:\xampp\htdocs\Editracker\app\bootstrap.php.cache on line 2001
[06-May-2015 05:38:14 Europe/Berlin] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes) in C:\xampp\htdocs\Editracker\vendor\symfony\symfony\src\Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector.php on line 176
什么可能是錯的?
您的腳本超出了允許的最大內存。 我懷疑這只是因為分析工具(底部的工具欄)而在dev中發生,特別是如果你啟用了xdebug。
您需要增加內存限制。 您可以通過設置以下內容在php.ini文件中執行此操作:
memory_limit的= '256M'
或者您可以在app_dev.php文件中設置此項,如果您只想增加開發中的內存限制:
函數ini_set( 'memory_limit的', '256M');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.