Magento에서이 오류가 발생했습니다. 나는 이것이 메모리 문제라는 것을 알고 있지만, 나는 이것을 유발하는 코드를 알고있다. 어떻게 그런 문제를 해결할 수 있습니까? 동일한 코드가 오랫동안 작동하고 갑자기 문제가 발생합니다.치명적 오류 : 허용 된 메모리 크기가 134217728 bytes exhausted Magento
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 94115841 bytes) in /home/wwwcruk/public_html/cas/app/design/frontend/default/cas/template/brandproduct/brand-listcar.phtml on line 60
내가 htaccess에서 256M
을 할당했습니다. 위의 파일에서 코드를 제거하면 작동합니다. 이것은 코드의 일부입니다.
<?php $i=0;$j=0;foreach ($manufacturers as $manufacturer): ?>
<?php if($i == 0 && $manufacturer['label'][0] == $char): $j++;?>
<li><span class="levelchar"><?php echo $char; ?></span></li>
<?php endif; ?>
<?php if($j>=$heightColumn):?>
</ul>
<ul class="level-brandul">
<?php $j=0; endif;?>
<?php while($manufacturer['label'][0] != $char){ $char++;?>
<?php if($manufacturer['label'][0] == $char): $j++; ?>
<li><span class="levelchar"><?php echo $char; ?></span></li>
<?php if($j>=$heightColumn):?>
</ul>
<ul class="level-brandul">
<?php $j=0; endif;?>
<?php endif; ?>
<?php }?>
난 아직도 메모리 제한을 증가 후 오류가 발생했습니다 :이 문제를 일으키는 두 줄 ($manufacturer['label'][0] == $char
가) 있습니다.
[Mon Apr 21 10:52:52 2014] [error] [client 82.94.176.140] in /home/wwwcruk/public_html/cas/app/design/frontend/default/cas/template/brandproduct/brand-listcar.phtml on line 47, referer: http://creationsautosport.co.uk/cas/index.php/catalog/product/view/id/58/s/bmw-m-power-silver-number-plate-surrounds/category/4/
[Mon Apr 21 10:49:50 2014] [error] [client 82.94.176.140] Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 504104961 bytes) in /home/wwwcruk/public_html/cas/app/design/frontend/default/cas/template/brandproduct/brand-listcar.phtml on line 47, referer: http://creationsautosport.co.uk/cas/index.php/catalog/product/view/id/58/s/bmw-m-power-silver-number-plate-surrounds/category/7/
[Mon Apr 21 10:47:08 2014] [error] [client 82.94.176.140] Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 504104961 bytes) in /home/wwwcruk/public_html/cas/app/design/frontend/default/cas/template/brandproduct/brand-listcar.phtml on line 47, referer: http://creationsautosport.co.uk/cas/index.php/catalog/product/view/id/58/s/bmw-m-power-silver-number-plate-surrounds/category/9/
[Mon Apr 21 10:46:56 2014] [error] [client 39.47.121.31] Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 496762881 bytes) in /home/wwwcruk/public_html/cas/app/design/frontend/default/cas/template/brandproduct/brand-listcar.phtml on line 47
[PHP : 치명적 오류 : 허용 된 메모리 크기 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)] 복제본 (http://stackoverflow.com/questions/561066/php-fatal-error-allowed-memory- size-of-134217728-bytes-exhausted-codeigniter) – Stony
@Stony이 코드를 index.php 파일에 넣었을 때'ini_set ('memory_limit', '-1');''500 Internal Server Error'가 있습니다. – Adda
메모리 할당 오류 (128M)의 일반적인 부족, Magento는 256M 이상이 필요합니다. 최신 버전, 10k 카탈로그, 10k 고객은 512M 이상으로 만듭니다. 외부 PHP 스크립트를 실행하는 경우 명령 줄 PHP 인터프리터의 메모리 제한도 설정해야합니다. –