Jump to content

Problems with APC and PHP Interface


Darghon

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.