惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

博客园 - SunWentao

Man or Honor 怒海潜将,壮志潜龙 美军的Navy Dive Carl Brashear unitycn.cn 关停了 windows 开发者神器 tc – total command和替代品 c#版本与vs的对应关系 十年前的博客,今天终于又回来了 配置total commander 显示所有或特定文件夹 (带点的文件夹) 如何删除cygwin c++ 11 practise -1- 在word中实现代码的语法高亮 最好用最方便的sqlite管理工具 日本小孩的教育 zz 2013年公司年会照片 跟乌克兰人学编程1 我不怕会1000种拳法的人,但我怕只会一种拳法,练1000遍的人. by 李小龙 乌克兰人的编程习惯 换个活法:临终前会后悔的25件事 内心强大的指标 史丹佛毕业25年 我最有钱的同学是...zz 榨汁机食谱大全
Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法
SunWentao · 2013-01-06 · via 博客园 - SunWentao

Php Fatal error: Allowed memory size of 33554432 bytes exhausted 的解决办法

在 php.ini 配置文档里面,默认的memory_limit 属性值为32M ,值设置得太小了而导致这个问题的出现。

解决这个问题,我们一般有三种方式:

1、修改PHP网站配置文件

在没有服务器配置权限时,编辑类似config.php这样的文件,给它加上一句:
define('MEMORY_LIMIT', '64M');
其中64M可以写得更大,比如128M。

注意文件编码。

2、修改php.ini配置文件

到你的网站根目录下,建立一个php.ini文件,写入下面这句:
memory_limit = 128MB
然后再到网站根目录下修改.htaccess这个文件,写入下面这句:
SetEnv PHPRC /home/vhost/public_html/site1/
(php.ini所在的路径)

3、在根目录建立.htaccess文件,添加如下内容:
php_value memory_limit 128M

注:修改php.ini配置文件将对服务器上所有PHP网站生效。