使用的ini_set(QUOT; memory_limit的"," -1 QUOT;),仍然出现内存不足 [英] using ini_set("memory_limit", "-1") and still out of memory

查看:608
本文介绍了使用的ini_set(QUOT; memory_limit的"," -1 QUOT;),仍然出现内存不足的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海兰所有,

我处理一个旧的数据库PHP数组到新的数据库。数据.php文件是围绕220 MB总大。

I'm processing an old database php array to the new database. The data .php files is in total around the 220 MB large.

我插在脚本这些行,以便它应该运行良好:

I've inserted these lines in the script so that it should run fine:

ini_set("memory_limit", "-1");
set_time_limit(0);

这是我怎么包括产品:

// The exports made by PHPMYADMIN, exported as PHP-Array
require_once 'export/tx_ttproductsv2_products.php';
require_once 'export/tx_ttproductsv2_keyword.php';
require_once 'export/tx_ttproductsv2_keywords_in_products.php';
require_once 'export/tx_ttproductsv2_typebook.php';
require_once 'export/tx_ttproductsv2_typegospel7.php';
require_once 'export/tx_ttproductsv2_typemedia.php';

当脚本试图要求他们我得到这个错误:

When the script is trying to require them i get this error:

PHP Fatal error:  Out of memory (allocated 880541696) (tried to allocate 469762048 bytes) in ......

我有一个本地的EasyPHP安装在x64上的Win 7 SP1上运行。我有6 GB内存,英特尔酷睿i5。

I've got an local EasyPHP installation running on x64 Win 7 SP1. I've got 6 GB memory, Intel i5.

如果你已经需要更多的信息,然后问吧。

If you've need more information, then ask it.

我的问题是柠简单。我怎样才能让PHP没有内存错误运行整个脚本...

My question is verry simple. How can i get PHP to run the whole script without the memory error...

推荐答案

内存的限制来自于操作系统,而不是从PHP本身。

Memory limitation comes from the OS, not from PHP itself.

您的脚本分配800MB,并试图进一步分配500MB

Your script allocated 800MB and is trying to allocate further 500MB

尝试使用64位PHP运行在64位操作系统的脚本。

Try to run the script on 64bit OS with 64 bit PHP.

这篇关于使用的ini_set(QUOT; memory_limit的"," -1 QUOT;),仍然出现内存不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆