Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Zend Framework problemy przy testach/konfiguracji apache
hhg
post 24.09.2007, 11:00:06
Post #1





Grupa: Zarejestrowani
Postów: 316
Pomógł: 0
Dołączył: 5.07.2006

Ostrzeżenie: (0%)
-----


korzystam z Webserv (webserv.pl) na Windows XP i uruchamiam apache na porcie 8080 bo 80 jest zajety przez IIS

uczę się korzystać z Zend Framework z tego:
http://blog.heavymind.net/zend-framework-tutorial/

a stanąłem przy tym:
http://blog.heavymind.net/zend-framework-tutorial/#300

Samo uruchomienie pliku index.php zwraca mi inny błąd niz ten w krusie wiec podjerzewam ze mam cos zle z apache (z tresci komunikatu) bo wg kursu powinienem dostać:

Kod
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception'
      with message 'Invalid controller specified (index)' in…


a dostaje


Kod
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'index/index.phtml' not found in path (.\application\views\scripts\)' in D:\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php:856 Stack trace: #0 D:\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php(764): Zend_View_Abstract->_script('index/index.pht...') #1 D:\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(742): Zend_View_Abstract->render('index/index.pht...') #2 D:\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(763): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL) #3 D:\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(810): Zend_Controller_Action_Helper_ViewRenderer->render() #4 D:\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\HelperBroker.php(160): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #5 D:\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action.php(504): Zend_Cont in D:\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php on line 856


sturkture katalogów mam OK, a to jest mój plik httpd.conf:
http://www.isengard.metal.pl/httpd.conf

nie mam pojęcia co mam źle
w razie potrzeby mogę wrzucic tez gdzies strutkure katalogów
z gory dzieki za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
zur887
post 13.04.2008, 23:22:31
Post #2





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 19.04.2006

Ostrzeżenie: (0%)
-----


O ile jeszcze aktualne.

Jak dla mnie nie masz lub masz błędną ścieżkę do pliku widoku index.phtml, pełna ścieżka do pliku u Ciebie być w taka D:\WebServ\httpd\zf-tutorial\application\views\scripts\index\index.phtml

plik kontrolera D:\WebServ\httpd\zf-tutorial\application\controllers\IndexController.php
  1. <?php
  2. class IndexController extends Zend_Controller_Action
  3. {
  4. public function indexAction()
  5. {
  6. $data['title'] = 'Zend Frameowrk test page';
  7. $data['body'] = '<h1>Witaj :)</h1>';
  8.  
  9. $this->view->data = $data;
  10.  
  11. // jeśli będą problemy z wyświetleniem widoku - odkomentuj tą linię
  12. //$this->view->render('indexindex.phtml');
  13.  
  14. }
  15. }
  16. ?>


plik widoku D:\WebServ\httpd\zf-tutorial\application\views\scripts\index\index.phtml

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  3. <title><?php echo $this->data['title']; ?></title>
  4. </head>
  5. <?php echo $this->data['body']; ?>
  6. </body>
  7. </html>


Pomocny będzie manual:
- http://framework.zend.com/manual/en/zend.controller.html
- http://framework.zend.com/manual/en/zend.view.html

Ten post edytował zur887 13.04.2008, 23:30:41
Go to the top of the page
+Quote Post
Sabistik
post 14.04.2008, 10:50:01
Post #3


Administrator wortalu


Grupa: Przyjaciele php.pl
Postów: 960
Pomógł: 39
Dołączył: 21.10.2003
Skąd: Kraków

Ostrzeżenie: (0%)
-----


Cytat
O ile jeszcze aktualne.

Tak, na pewno temat z przed pół roku jest aktualny....
Przenoszę...
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 31.07.2025 - 10:43