尝试使用MySQLi时内存耗尽 [英] Memory size exhausted while trying to use MySQLi

查看:60
本文介绍了尝试使用MySQLi时内存耗尽的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从那里开始使用MysqliDb类.

I am using MysqliDb Class from there.

https://github.com/ajillion/PHP-MySQLi-Database-Class/blob/master/MysqliDb.php

当我在本地PC上使用时,我没有任何问题.但是我昨天买了主机.我大约5分钟前上传了文件,但无法正常工作.我检查了主机,并创建了error_log文件和此文件.

When i used on local pc, i don't have any problem. But I bought host yesterday. And I uploaded my files about 5 min ago and doesn't work. I checked my host and created error_log file and this..

PHP Fatal error:  Allowed memory size of 75497472 bytes exhausted (tried to allocate 4294967296 bytes) in /home/(..)/MysqliDb.php on line 417

这是什么问题?

我在配置文件中使用了此代码.但是同样没有用.

I used this code on my config file. But same didn't work.

ini_set('memory_limit', '192M');

推荐答案

我认为这是您在数据库中使用LongText.

I think that is that you are using LongText in your database.

请阅读以下消息: https://bugs.php.net/bug.php ?id = 51386

因此,请尝试在bind_result之前 mysqli :: store_result .

So try to mysqli::store_result before bind_result.

这篇关于尝试使用MySQLi时内存耗尽的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆