首页 > 其他分享 >Allowed memory size of 134217728 bytes exhausted (tried to allocate 39845912 bytes)

Allowed memory size of 134217728 bytes exhausted (tried to allocate 39845912 bytes)

时间:2022-10-14 16:02:52浏览次数:43  
标签:PHP tried 134217728 bytes limit ini memory php


PHP报错

原因:超出了PHP最大内存。

处理办法

1.在文件中添加

@ini_set('memory_limit', '512M'); // 设置最大内存

2.修改php.ini文件

打开终端输入下列bash命令

cd /private/etc
sudo cp php.ini.default php.ini
sudo vi php.ini
memory_limit = 128 #这里按照业务需求修改大小


标签:PHP,tried,134217728,bytes,limit,ini,memory,php
From: https://blog.51cto.com/u_15565664/5757137

相关文章

  • go控制台输出乱码-go执行命令输出乱码-编码bytes为gbk字符串
    go控制台输出乱码|go执行命令输出乱码|编码bytes为gbk字符串1、问题描述使用go运行ping命令时,输出乱码,现象如下代码packagemainimport("fmt""os/exec"......
  • 0044-Bytes-bytes源码阅读
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://github.com/tokio-rs/bytes目标Buf是一个trait,里面有几个方法需要实现,Bytes实现了Buf。re......
  • 0045-Bytes-bytes源码阅读
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://docs.rs/bytes/latest/bytes/struct.Bytes.html目标Bytes的源码基本上看完了,简单使用一下其中......
  • 0046-Bytes-bytes源码阅读
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://docs.rs/bytes/latest/bytes/trait.Buf.html目标Bytes实现了Buf,使用一下其中的方法。remain......
  • 0047-Bytes-BytesMut使用
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://docs.rs/bytes/latest/bytes/struct.BytesMut.html目标使用BytesMut的方法。with_capacity......
  • 0048-Bytes-BufMut使用
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://docs.rs/bytes/latest/bytes/trait.BufMut.html目标使用BufMut的方法。remaining_mutfnma......
  • 0043-Bytes-bytes源码阅读
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://github.com/tokio-rs/bytes目标Bytes实现迭代器。IntoIter#[derive(Debug)]pubstructInt......
  • Specified key was too long; max key length is 767 bytes错误的原因
    将mysql数据库里某个UNIQUE唯一索引字段从utf8改为utf8mb4时提示1071-Specifiedkeywastoolong;maxkeylengthis767bytes,来看看这个错误的来原因。来几个知识点......
  • 实例-rust-string和bytes转换
    Cargo.toml[package]name="rust-example9"version="0.1.0"edition="2021"#Seemorekeysandtheirdefinitionsathttps://doc.rust-lang.org/cargo/refere......
  • 0042-Bytes-bytes源码阅读
    环境Time2022-05-29Rust1.61.0Bytes1.1.0前言说明参考:https://github.com/tokio-rs/byteshttps://zhuanlan.zhihu.com/p/109977513目标之前阅读的部分,都......