dongtan4046 2013-12-12 00:11
浏览 80

瘦全PHP请求全局致命错误

I'm experiencing a problem with all the requests in my app. The below error is returned in about 20% of requests, no matter a specific request, it seems to be indiscriminate in frequency based on the request. This problem started appearing when I decided to run the app locally on my new computer, so I'm guessing it's an environment issue. Given the infrequency of it and my unfamiliarity with the Slim core I feel at a loss to address this issue.

I'm running PHP-FPM - running PHP 5.3.27 - on top of Nginx. I'm running Slim 2.4.0 Let me know if you need to know any php.ini values, the modules in the PHP install, or anything else relevant. Since it's an issue global to the app I'm not sure exactly what code to include. Thanks a lot for your help.

Notice: Undefined property: Slim\Slim::$container in Slim/Slim.php on line 234

Notice: Indirect modification of overloaded property Slim\Slim::$container has no effect in Slim/Slim.php on line 239

Notice: Undefined property: Slim\Slim::$container in Slim/Slim.php on line 234

Notice: Indirect modification of overloaded property Slim\Slim::$container has no effect in Slim/Slim.php on line 155

Notice: Undefined property: Slim\Slim::$container in Slim/Slim.php on line 234

Fatal error: Call to a member function singleton() on a non-object in Slim/Slim.php on line 158

Below is the top of my index.php (where all non-file requests get routed) showing the instantiation of the \Slim\Slim object. There's nothing but constant definitions in config.php and all the responses are defined in lines following these:

/**
* Define Constants
 */
require_once 'config.php';

/**
 * Require the Slim Framework
 *
 * If you are not using Composer, you need to require the
 * Slim Framework and register its PSR-0 autoloader.
 *
 * If you are using Composer, you can skip this step.
 */
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();

/**
 * Instantiate a Slim application
 *
 * This example instantiates a Slim application using
 * its default settings. However, you will usually configure
 * your Slim application now by passing an associative array
 * of setting names and values into the application constructor.
 */
$app = new \Slim\Slim(array(
    'mode' => 'development',
    'debug' => false,
    'log.enabled' => false,
    'templates.path' => APPPATH . '/templates',
    'cookies.encrypt' => true,
    'cookies.lifetime' => '12 hour',
    'cookies.secret_key' => '$apr1$4s961sza$txDJLrSg2suGYqkWf24wL.'
));

$res = $app->response();
$res['Content-Type'] = 'application/json';
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 WPF 大屏看板表格背景图片设置
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示