PHP Allowed Memory Size Exchausted Fatal Error PHP的允许内存大小exchausted致命错误
A functional PHP script returns the following error either on the web page or in Apache error log file when it exchausted and used up the default memory requirement of 8 MB memory allocation:一个功能的PHP脚本返回以下错误或者该网页或在Apache错误日志文件时, exchausted和使用了默认记忆体的要求, 8 MB记忆体分配:
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate … bytes) in … PHP的致命错误:让记忆体的大小8388608字节用尽(试图拨出…字节)在…
The error normally occurs when PHP tries to process a big database records or when importing or exporting.该错误通常发生时, PHP的尝试过程中一个很大的数据库记录或当进口或出口。 To solve the error, there are two resolutions.要解决错误,有两项决议。 One is to change and increase the memory limit of the particular PHP script by adding or including an additional line at the top of the script:一个是要改变和增加内存限制的,特别是PHP脚本加入或包括额外线在上方的脚本:
ini_set(”memory_limit”,”16M”); ini_set ( “ memory_limit ” , “一十六米” ) ;
You can assign the memory limit to any amount you like by changing the 16M to other number, such as 12M or 24M.您可以指定内存限制的任何金额你想通过改变16米到其他号码,如一十二米或24米。 16M will set the memory limit to 16 megabytes.一六米将设置内存限制为16兆字节。 If this doesn’t work and the PHP error still appearing, increase the memory limit until the PHP scripts running perfectly or the limit of your system hardware.如果这并不工作和PHP的错误仍然出现,增加内存限制,直到PHP脚本运行完全或限制您的系统硬件。
To change the memory allocation limit permanently for all PHP scripts running on the server, modify the PHP.INI configuration file of the server (location depending on your OS and installation method).要改变内存分配限制永久的所有PHP脚本服务器上运行,修改php.ini配置文件中的服务器(地点根据您的操作系统和安装方法) 。 Search for memory_limit after opening the file in an editor.搜索memory_limit后,打开该文件在编辑器中。 If the memory_limit doesn’t exist, add the following line.如果memory_limit不存在,添加以下行。 If it’s there, modify the value of the memory_limit:如果它的存在,修改该值的memory_limit :
memory_limit = 12M memory_limit =一二米
The 12M sets the limit to 12 megabytes (12582912 bytes).该十二米,订出限额至12兆字节( 12582912字节) 。 Change to the value you desirable.改变的价值,您是可取的。
An alternative way is to modify your PHP scripts that generate the error for more efficiency and better data handling.另一种方法是修改您的PHP脚本产生的误差为更多的效率和更好的数据处理能力等。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- PHP Parse Error: syntax error, unexpected $end PHP的解析错误:语法错误,意想不到的元月底
- gmmktime Error in WordPress and MagpieRSS gmmktime误差在WordPress和magpierss
- How to Customize, Modify or Change WordPress Database Connection Error Page如何自订,修改或改变的WordPress数据库连接错误页
- PHP Scripts open_basedir Restriction in Effect Error PHP脚本和open_basedir的限制,实际上是错误
- Oracle EXP-00091 Error When Export Database甲骨文进出口- 00091时发生错误,进出口数据库
- Comments and Comment Blocks in PHP意见和评论座在PHP
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation使MySQL的InnoDB存储引擎支持在xampp安装
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions PHP 5中无法打开HTTP请求流与fopen或fsockopen职能
- Spb Finance Synchronization Error in Microsoft ActiveSync国家邮政局财务同步误差在Microsoft ActiveSync的
- Joomla Direct Access to This Location Is Not Allowed Error joomla直接进入这个位置是不容许错误



















December 19th, 2007 09:58 2007年12月19日9时58分
I have same problem with yours.我有同样的问题与你。 Can this problem solved by editing any wordpress file?这个问题可以解决,通过修改任何的WordPress档案? or….或… … 。
without configuring php.ini?没有配置php.ini的?
thanks before感谢前
January 27th, 2008 17:35 2008年1月27日17时35分
I follow your instruction by modifying php.ini and it works. i按照您的指示,通过修改php.ini中和它的工程。 Thanks for sharing this information.感谢分享这方面的资料。
January 31st, 2008 11:20 2008年1月31日11时20分
Exactly what I was looking for to solve my problems!正是我一直在寻找解决我的问题! Thanks for the simple and clear instruction!感谢为简单而明确的指示!
February 16th, 2008 19:50 2008年2月16日19时50分
thanks谢谢
March 6th, 2008 10:32 2008年3月6日10时32分
After trying many solutions in order to get Wordpress to co-operate with Microsoft live writer.之后,许多解决方案,试图在以取得的WordPress发展商合作与微软生活的作家。 I finally came here and after editing “/wp-admin/includes/image.php”, the problem was solved.最后,我来到这里后,编辑“ / wp-admin/includes/image.php ” ,问题得到解决。
I just needed to add…我只是需要添加…
ini_set(”memory_limit”,”12M”); ini_set ( “ memory_limit ” , “ 1200万” ) ;
… right under the <?php tag …有权根据< ? PHP的标记
May 1st, 2008 13:34 2008年5月1日13时34分
where is PHP.INI location???那里是php.ini的位置? ? ?
May 22nd, 2008 11:15 2008年5月22日11时15分
I have ever got the same problem, but this ini_set(”memory_limit”,”12M”); line could not solved my problems.我以往任何时候都得到了同样的问题,但这个ini_set ( “ memory_limit ” , “ 1200万” ) ;线可以不解决我的问题。 I just removed all waste plugin.我只是删除了所有废物插件。 And walah, It worked.和walah ,它的工作。