本文介绍了增加php值内存限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将网站的网络目录转移到了新的主机上.导入目录和数据库后,出现此错误:

我发现我的.htaccess文件为空,并添加了以下行php_value memory_limit 256m,但是它不起作用,我将其更改为512m,这是他们支持的最高值,但仍然不起作用.有人可以帮我吗.....从来没有想过网站转移会如此困难.


所以我将以下内容添加到了.htaccess中php_value memory_limit 512Mphp_flag display_errors 1php_value error_reporting 8191

RewriteEngine开启RewriteBase/

我得到以下内容

严格的标准:仅变量应该在第90行的/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php中通过引用进行分配

严格标准:/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php中的引用只能分配变量

严格标准:只有变量应该在261行的/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php中通过引用进行分配

严格标准:只有变量应通过引用分配给/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php中的行

严格标准:第39行的/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php中的引用只能分配变量

严格标准:第30行的/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/slprettyphoto/slprettyphoto.php中的引用只能分配变量./p>

严格标准:第94行的/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/ctkfbinit/ctkfbinit.php中的引用只能分配变量

严重错误:/mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/libraries/joomla/database/第712行上的database/mysql.php

我将尝试关闭这些插件以查看会发生什么情况

解决方案

您可以尝试将其添加到代码顶部

<?php
set_time_limit(0);
ini_set('memory_limit', '-1');
?>

但是强烈建议您检查代码并使其高效地使用较少的内存.

I transferred the web directory of a site to new hosting. after importing the directory and the DB, I got this error:

I found my .htaccess file that was empty and added the linephp_value memory_limit 256m, and it didn't work, I changed it to 512m, which is the highest that they support and still doesn't work. Can someone help me please.....Never thought a site transfer would be this difficult.


so I added the folloing to .htaccessphp_value memory_limit 512Mphp_flag display_errors 1php_value error_reporting 8191

RewriteEngine onRewriteBase /

and I get the following

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php on line 90

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php on line 68

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php on line 261

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php on line 274

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/jantispam/jantispam.php on line 39

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/slprettyphoto/slprettyphoto.php on line 30

Strict Standards: Only variables should be assigned by reference in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/plugins/system/ctkfbinit/ctkfbinit.php on line 94

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 79 bytes) in /mnt/stor12-wc1-ord1/895923/www.youth-panel.com/web/content/libraries/joomla/database/database/mysql.php on line 712

I will try turning off those plugins to see what happens

解决方案

You may try to add this at the top of the code

<?php
set_time_limit(0);
ini_set('memory_limit', '-1');
?>

But it is highly suggested that you should check your code and make it efficient to use less memory.

这篇关于增加php值内存限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 15:41