SidC
SidC

Reputation: 3203

Blank home page after creating Zend index.phtml

I am just starting with Zend and am having an issue wherein browsing http://localhost renders a blank page. I've set httpd.conf documentroot to /var/www/HTML/public and enabled Zend_layout in bootstrap.PHP. My index.phtml is locatrd in the suggested directory per the .ZF manual.

Does IndexComtroller have to specifically call my index.phtml view? What other things should I check?

Thanks Much!

EDIT: I checked httpd.conf and noted mod rewrite is enabled. .htaccess file in /var/www/html/public has ReWrite Engine ON etc. I've not created a VirtualHost entry in httpd.conf. I simply defined DocumentRoot "/var/www/html/public" Is a virtualhost required to run the framework?

EDIT2: I used php -f /var/www/html/public/index.php and received the following

PHP Warning: require_once(Zend/Application.php): failed to open stream: No such 
file or directory in /var/www/html/public/index.php on line 18
PHP Fatal Error: require_once(): Failed opening required 'Zend/Application.php' 
(include_path=':.:/usr/share/pear:/usr/share/php') in /var/www/html/public/index.php
on line 18

Upvotes: 0

Views: 863

Answers (2)

Lars
Lars

Reputation: 5799

It seems that you did not setup Zend Framework in your include_path - did you copy the Zend-subdirectory of the installation packages libs-folder into /usr/share/php, so that you now have a directory called /usr/share/php/Zend/?

Upvotes: 0

Phil
Phil

Reputation: 164766

The first thing to do is make sure you have the appropriate error reporting enabled for development. Make sure these are set in your application.ini file

phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

Once you've done this, re-test and post back any error messages you receive.

Upvotes: 0

Related Questions