Problem with Zend Framework

We're trying to install Omeka 0.9.1.1 with:

* Solaris 10
* Apache 2.2.6
* PHP 5.2.4
* MySQL 5.0.45

(This is the "CoolStack" package - http://cooltools.sunsource.net/coolstack/)

We're not allowing .htaccess files, so we transplanted those configurations into the main httpd.conf file.

We had it working, but then later we installed the Zend framework. We included Zend framework in the include path in the php.ini file, and we need it to stay that way for other applications. Now Omeka is throwing this error:

Fatal error: Cannot redeclare class Zend_Db in /opt/coolstack/php5/lib/ZendFramework-1.5.0/library/Zend/Db.php on line 39

Is there a way to tell Omeka to use a different installation of Zend or another way to fix this error?

We have successfully installed the same version on another server without the Zend framework and it works fine.

Hi, you can try deleting the Zend library from your application/libraries/ directory in your Omeka installation, which would remove the conflict due to redeclared classes, but I'm still not sure that Omeka would work properly. Your server has ZF 1.5 installed and Omeka runs on version 1.0, so there may be things that have changed in the library that won't work anymore.

Another idea that occurred to me is, you could try modifying your include path in Omeka. To do that, open up the paths.php file in the root of your installation, then find the following line:

set_include_path(get_include_path().PATH_SEPARATOR.LIB_DIR.PATH_SEPARATOR.MODEL_DIR);

and remove the get_include_path(). part, which should tell Omeka to ignore the include path that was set in the php.ini file, and let me know if that works.

Thanks for the suggestions! I did notice the "paths.php" file and that it sets the include path dynamically. In a rare flash of insight, it occurred to me that I might change that. I tried setting it explicitly to:

set_include_path('/opt/coolstack/php5/lib/php:.'.PATH_SEPARATOR.LIB_DIR.PATH_SEPARATOR.MODEL_DIR);

One of my expert coworkers suggested that I keep "/opt/coolstack/php5/lib/php" in there, in case there was some other dependency.

Lo and behold, no more error! Now we have to see if the people who intend to use this installation will have any problems creating content.

Thanks again!

CastIronCook--

That's great. Glad to hear you're up and running. Please let us know how the project turns out.

Tom Scheinfeldt