FAQ
Hi!

I have a problem with APC and a custom stream wrapper implementation.
The wrapper is used to include generated PHP classes. If APC is enabled
it seems that the include statement(used with different URL's), loads
always the first included class from cache.

The following code illustrates the issue a bit more.

https://gist.github.com/1156717

If executing it with APC enabled, I get the following fatal error.

Fatal error: include(): Cannot redeclare class test1 in ... on line 78
PHP Fatal error: include(): Cannot redeclare class test1 in ... on line 78

Is this a bug? Or do I miss something?

Christian

Search Discussions

  • Pierre Joye at Aug 19, 2011 at 1:07 pm
    hi,

    Have you tried using the latest version of APC or using svn's trunk?

    If not please try it and report a bug at pecl.php.net/apc if it still occurs

    Thanks for your feedback!

    On Fri, Aug 19, 2011 at 2:54 PM, Christian Kaps
    wrote:
    Hi!

    I have a problem with APC and a custom stream wrapper implementation.
    The wrapper is used to include generated PHP classes. If APC is enabled
    it seems that the include statement(used with different URL's), loads
    always the first included class from cache.

    The following code illustrates the issue a bit more.

    https://gist.github.com/1156717

    If executing it with APC enabled, I get the following fatal error.

    Fatal error: include(): Cannot redeclare class test1 in ... on line 78
    PHP Fatal error:  include(): Cannot redeclare class test1 in ... on line 78

    Is this a bug? Or do I miss something?

    Christian

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: http://www.php.net/unsub.php


    --
    Pierre

    @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
  • Christian Kaps at Aug 19, 2011 at 1:27 pm
    Thanks for your fast feedback. I've tried it with the latest(3.1.9)
    version. Can someone who has the actual trunk compiled, give feedback
    for the snippet(https://gist.github.com/1156717)?

    Christian


    Am 19.08.2011 15:07, schrieb Pierre Joye:
    hi,

    Have you tried using the latest version of APC or using svn's trunk?

    If not please try it and report a bug at pecl.php.net/apc if it still occurs

    Thanks for your feedback!

    On Fri, Aug 19, 2011 at 2:54 PM, Christian Kaps
    wrote:
    Hi!

    I have a problem with APC and a custom stream wrapper implementation.
    The wrapper is used to include generated PHP classes. If APC is enabled
    it seems that the include statement(used with different URL's), loads
    always the first included class from cache.

    The following code illustrates the issue a bit more.

    https://gist.github.com/1156717

    If executing it with APC enabled, I get the following fatal error.

    Fatal error: include(): Cannot redeclare class test1 in ... on line 78
    PHP Fatal error: include(): Cannot redeclare class test1 in ... on line 78

    Is this a bug? Or do I miss something?

    Christian

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: http://www.php.net/unsub.php

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedAug 19, '11 at 12:54p
activeAug 19, '11 at 1:27p
posts3
users2
websitephp.net

2 users in discussion

Christian Kaps: 2 posts Pierre Joye: 1 post

People

Translate

site design / logo © 2022 Grokbase