I have a very simple form created with the help of Zend Framework with only
one text box that loads fine on my two development machines (Win and Linux)
but generates 2 warnings and a fatal error on my production Linux machine.

For this test I am using PHP 5.2.3 and I added the path to the Zend
Framework Library in my php.ini file. File permissions are good (everyone
can at least read).

I have added the PHP code here for completeness, but it might not be
important for this problem. The error messages below are what I really need
help with.

Contents of formtest.php:

   $f = new ZDF();
   $request = new Zend_Controller_Request_Http();
   $view = new Zend_View( array( 'basePath' => '/templates' ) );
   $view->addHelperPath( 'Zend/View/Helper/', 'Zend_View_Helper' );
   echo $f->render( $view );

Contents of formclass.php

   class ZDF extends Zend_Form
      public function init()
         $this->setAction( 'testform1.php' );
         $this->setMethod( 'post' );
         $this->setAttrib( 'id', 'testform' );

         $e = $this->createElement( 'Text',
                                    array( 'label' => 'First name',
                                           'required' => 'true',
                                           'invalidMessage' => 'This field
cannot be left blank.' ) );

         $this->addElement('submit', 'Submit', array('label' => 'Submit'));

      public function setView(Zend_View_Interface $view) {
         foreach ($this as $item) {
         return $this;

Here are the warnings and the error that I get:

Warning: Zend_Loader_PluginLoader::require_once()
[function.Zend-Loader-PluginLoader-require-once]: couldn't resolve host name
in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

[function.Zend-Loader-PluginLoader-require-once]: failed to open stream:
Success in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on
line 389

Fatal error: Zend_Loader_PluginLoader::require_once() [function.require]:
Failed opening required 'Zend/Loader/PluginLoader/Exception.php'
in /usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

Please note that the script got to line 389 of the PluginLoader.php file,
which means that it was able to load that file, which furthermore indicates
that the include path is correct and working. However, it cannot open the
file Zend/Loader/PluginLoader/Exception.php.
This file exists and has read permissions for everyone.
Another really perplexing issue is that when I add some debug code in the
PluginLoader.php file just before line 389 and call
it returns false. When I open a console and copy and paste this absolute
path into a call to vi for example, it opens the file. So the file exists,
php was able to open the PluginLoader.php at an earlier point file but now
all of a sudden it cannot open a file that clearly exists.

when I hard code the absolute path on line 389 the first warning changes to
Warning: Zend_Loader_PluginLoader::require_once()
[function.Zend-Loader-PluginLoader-require-once]: URL using bad/illegal
format or missing URL in
/usr/local/php5/lib/php/library/Zend/Loader/PluginLoader.php on line 389

My first reaction was that this is a permissions problem, but even after
doing a chmod -R 777 on the Zend directory it does not work. My next guess
was open file limit, but my hosting companies support told me the limit is
set to 4000 and it is not even coming close to that.

Any ideas?
View this message in context: 
Sent from the PHP - General mailing list archive at Nabble.com.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to