doulu4233 2015-06-03 08:14
浏览 49

FACEBOOK PHP SDK v4.0允许内存问题

I'm trying to run the Facebook SDK for PHP v4.0 for the past two days, but without results. I'm not using Composer, but the autoload.php file. I'm getting the following errror message :

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 2623910681 bytes)

~ It tries to allocate about 2GB memory, and I'm using a shared hosting, I can't increase the memory_limit more than 256MB...

I'm loading the autoload.php file in this way:

session_start();
define( 'ROOT', dirname( __FILE__ ) . '/' );
require_once( ROOT . 'facebook-php-sdk-v4-4.0-dev/autoload.php' );
use Facebook\FacebookSession;

Is there some solution to this problem? I browsed much on google, there are people facing same issue. Also the amount of memory used doesn't seem reasonable to me.

I hope someone has an idea how to fix this!

  • 写回答

1条回答 默认 最新

  • drt41563 2017-02-21 17:25
    关注

    I had the same problem and upgrading PHP version to 5.6 solved the memory issue. You must be aware that PHP 5.6 sets the default charset to UTF8.

    评论

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试