Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[apc error] Dynamic inheritance detected for class
  • Hi guys,

    I seem to have a problem, I am getting an error like this:

    Error - 2012-12-19 16:21:52 --> 2 - include(): Dynamic inheritance detected for class model_blog in /home/test/public_html/fuel/core/classes/autoloader.php on line 282

    I think it is produced by APC (I run PHP 5.3.19 & APC 3.1.13).


    The following class is causing the issue:

    ---
    /home/test/public_html/app/classes/bla.php
    ---

    class Bla
    {
    public static function add($data = null)
    {
    // Add blog entry
    $blog = Model_Blog::forge();
    $blog->user_id = 5;
    $blog->data = $data;
    $blog->save();
    }
    }

    In a controller I call: Bla::add('123');
  • It's a warning, not an error.

    You have to be careful using tools like APC for opcode caching in a development environment. It can cause all kinds of issues due to discrepancies between the compiled cached version and the modified version on disk.

    This is most likely the cause of the warning. If you restart APC and test again, you do still have the warning?
  • restarting php-fpm seems to do the trick... weird...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion