Jump to content

Recommended Posts

Hello all,

 

I'm developing my own framework on a windows 7 with xampp istalled, and apc enabled.

I made a generator controller that can be accessed through php cli, and I can call a generator.

But once I try to call a 2nd one, I get a APC error saying it can not re-initialise a interface:

 

C:\Projects\Framework\fw>php framework build:project
Creating folder structure...................DONE
Creating default files.........DONE

C:\Projects\Framework\fw>php framework build:application frontend
[Tue Jul 05 15:33:42 2011] [apc-error] Cannot redeclare class igenerator in C:\Projects\Framework\fw\core\objectCollector.class.php on line 397.

C:\Projects\Framework\fw>

(it crashes on the autoloader)

 

the 'IGenerator' is the only interface I currently have in the framework, and it's used to manage "builders" so the generator object can work with external or custom builders.

 

How can I fix this? or is this a apc core error?

 

IGenerator Code: (but don't think this has anything to do with it)

<?php
/**
* Any class that implements this interface can be registered to the generator as a builder.
* @author Darghon
*/
interface IGenerator {
/**
 * Public construct method receiving a single parameter, 
 * which represents all possible parameters join in an array
 */
public function __construct($args = array());
/**
 * Public destroy method that will be triggered when the class gets unset, or destroyed
 */
public function __destroy();
/**
 * The method that the generator class will apply. This method must ALWAYS exist, and return a Boolean on success or fail.
 * @return boolean
 */
public function generate();

}

?>

Link to comment
https://forums.phpfreaks.com/topic/241130-problems-with-apc-and-php-interface/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.