致命错误:已用尽允许的 25165824 字节内存大小(尝试分配 31436096 字节)

2023-10-16php开发问题
4

本文介绍了致命错误:已用尽允许的 25165824 字节内存大小(尝试分配 31436096 字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我是 Joomla 的新手,我现在使用的是 Joomla 1.6

I'm new to Joomla and I'm now using Joomla 1.6

我遇到的问题是当我尝试通过管理工具上传扩展时,我收到以下错误消息:

The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message:

"Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 31436096 bytes)
 in C:AppServwwwlibrariesjoomlafilesystemfile.php on line 295"

我已经阅读了一些相关的消息,但没有得到解决.phpinfo 返回一个我认为可能相关的值:

I've read some relevant messages but didn't get it solved. The phpinfo returns a value which I think may be relevant:

1)upload_max_filesize      local value=200; master value=200

我说得对吗?如果是,我该如何更改?(我无法远程访问服务器.)

Am I correct? If yes, how can I change it? (I can't remote to the server.)

推荐答案

您的内存限制(24 兆字节)对于 Joomla 来说相当低,尤其是对于它的更新程序.我建议至少 32 兆字节,最好是 64 兆字节.

Your memory limit (24 Megabyte) is rather low for Joomla and especially for its updater. I recommend at least 32 Megabyte, better 64 Megabyte.

如何更改取决于您的服务器环境.如果您可以访问 php.ini,您应该查找包含 memory_limit 的行并将其值设置为 32M(或 64M 或任何适合您的值)

The how to change is it is dependent on your server environment. If you have access to your php.ini you should look for a line that contains memory_limit and set its value to 32M (or 64M or whatever value works for you)

如果您无法访问 php.ini,请尝试通过 .htaccess 文件进行设置:

In case you can't access the php.ini try setting it trough the .htaccess file:

php_value memory_limit 1000M

如果这也失败了,您应该联系您的托管人.有些有一个网络界面,允许更改此设置.不幸的是,其他人根本不允许更改它.您唯一的机会就是请求您的托管商更改其服务器配置.

If that also fails you should contact your hoster. Some have a web interface to allow changing this settings. Unfortunately others doesn't allow changing it at all. Your only chance is begging your hoster to change its server configuration.

这篇关于致命错误:已用尽允许的 25165824 字节内存大小(尝试分配 31436096 字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

PHP实现DeepL翻译API调用
DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以...
2025-08-20 php开发问题
168

PHP通过phpspreadsheet导入Excel日期数据处理方法
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的...
2024-10-23 php开发问题
287

mediatemple - 无法使用 codeigniter 发送电子邮件
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)...
2024-08-23 php开发问题
11

Laravel Gmail 配置错误
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)...
2024-08-23 php开发问题
16

将 PHPMailer 用于 SMTP 的问题
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)...
2024-08-23 php开发问题
4

关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)...
2024-08-23 php开发问题
17