Hey,
after upgrading to Debian Lenny (2.6.24.2-vs2.2.0.5.0.7-xeon15 #1 SMP
x86_64 GNU/Linux) I am encountering serious problems with Zend_Form.
Whenever I try to open a page containing a Zend_Form-generated form I
get the following error:
Fatal error: Cannot redeclare class Zend_Filter_Interface in
/usr/local/ZendFramework/library/Zend/Filter/Interface.php on line 30
I would be very grateful if anybody could give me a hint towards a
solution for the problem. The error occurs when I try to output the form
via Zend_View:
<div id="bkform">
<?php echo $this->form; ?>
</div>
When I use print_r() or var_dump() the form is dumped correctly.
There were no such errors before the os upgrade. Maybe this has to do
with the PHP version (PHP 5.2.6-1+lenny3 with Suhosin-Patch 0.9.6.2).
The error occurs irrespective of the ZF version (1.7.4 to 1.8.0). As
regards my site configuration, I use autoloading (no opcode caching
mechanism is used on the machine).
My bootstrap class (ZF 1.8.0) has the following directives:
$rootDir = dirname(dirname(__FILE__));
define('ROOT_DIR', $rootDir);
set_include_path(
'/usr/local/ZendFramework/library'
. PATH_SEPARATOR . get_include_path()
. PATH_SEPARATOR . ROOT_DIR . '/lib'
. PATH_SEPARATOR . ROOT_DIR . '/application/models'
. PATH_SEPARATOR . ROOT_DIR . '/application/forms'
);
require_once 'Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();
$loader->setFallbackAutoloader(true);
$loader->suppressNotFoundWarnings(false);
The include_path directive in php.ini reads as follows:
include_path = ".:/usr/share/php"
Thanks a lot in advance!
Stefan