开发者

Blank home page after creating Zend index.phtml

开发者 https://www.devze.com 2023-03-31 22:39 出处:网络
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 bootstr

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=':.:开发者_Python百科/usr/share/pear:/usr/share/php') in /var/www/html/public/index.php
on line 18


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.


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/?

0

精彩评论

暂无评论...
验证码 换一张
取 消