Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [ZendFramework]problem z uruchomieniem projektu.
gummmibear
post 11.08.2009, 22:07:21
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 12.03.2009
Skąd: Poznań

Ostrzeżenie: (10%)
X----


Hej. Chciałbym uruchomić sobie projekt na ZendFramework, Troche poduczyć się w tej kwestii.


uruchamiam stronkę wraz z tutorialem znajdującym się pod adresem :


http://framework.zend.com/docs/quickstart/create-a-layout

wszystko ustawiłem sobie wraz z tutorialem.

niestety coś jednak nie działa sciana.gif

uruchamiając Bootstrap.php

otrzymuję


Fatal error: Class 'Zend_Application_Bootstrap_Bootstrap' not found in /var/www/zend/quickstart/application/Bootstrap.php on line 3

Gdzie znajdują sie pliki z tą klasą?

Libki mam wgrane do katalogu:(podlinkowane)
/var/www/zend/quickstart/library/Zend

Gdzie leży mój błąd?

Ten post edytował gummmibear 11.08.2009, 22:07:51
Go to the top of the page
+Quote Post
pgrzelka
post 12.08.2009, 00:54:30
Post #2





Grupa: Zarejestrowani
Postów: 313
Pomógł: 24
Dołączył: 9.08.2008
Skąd: Kielce

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


set_include_path mogłeś źle ustawić w index.php
daj kod index.php i strukturę katalogów


--------------------
Go to the top of the page
+Quote Post
qba_rox
post 12.08.2009, 14:00:09
Post #3





Grupa: Zarejestrowani
Postów: 29
Pomógł: 1
Dołączył: 12.01.2009
Skąd: Warszawa

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


prawdopodobnie zbyt gleboko wszedles (do katalogu Zend) jak ustawiales include path, cos mi intuicja mowi ze powineines miec: '/var/www/zend/quickstart/library' tongue.gif


--------------------
Kodzimy!!!
Go to the top of the page
+Quote Post
gummmibear
post 12.08.2009, 21:35:56
Post #4





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 12.03.2009
Skąd: Poznań

Ostrzeżenie: (10%)
X----


[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/var/www/zend/quickstart/library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
[staging : production]
resources.view[] =

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

hmm. dałem całkowitą ścieżkę do pliku, tez ten zam błąd

wtf?
Go to the top of the page
+Quote Post
batman
post 13.08.2009, 07:03:21
Post #5





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




1. includePaths.library = APPLICATION_PATH "/../library"
2. Pokaż index.php
3. Pokaż boostrap.php


--------------------
I would love to change the world, but they won't give me the source code.
My software never has bugs. It just develops random features.
Go to the top of the page
+Quote Post
gummmibear
post 13.08.2009, 09:40:34
Post #6





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 12.03.2009
Skąd: Poznań

Ostrzeżenie: (10%)
X----


Bootstrap.php
  1. <?php
  2. class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
  3. {
  4.  
  5. protected function _initDoctype()
  6. {
  7. $this->bootstrap('view');
  8. $view = $this->getResource('view');
  9. $view->doctype('XHTML1_STRICT');
  10. }
  11.  
  12.  
  13. }




Mały zonk. Gdzie znajduje sie index.php?

w katalogu quickstart go niema.
Go to the top of the page
+Quote Post
batman
post 13.08.2009, 09:55:28
Post #7





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




index.php jest punktem wejścia do aplikacji i znajduje się w katalogu public.


--------------------
I would love to change the world, but they won't give me the source code.
My software never has bugs. It just develops random features.
Go to the top of the page
+Quote Post
gummmibear
post 13.08.2009, 11:51:38
Post #8





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 12.03.2009
Skąd: Poznań

Ostrzeżenie: (10%)
X----


Znalazłem winksmiley.jpg

  1. <?php
  2.  
  3. // Define path to application directory
  4. defined('APPLICATION_PATH')
  5. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  6.  
  7. // Define application environment
  8. defined('APPLICATION_ENV')
  9. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  10.  
  11. // Ensure library/ is on include_path
  12. set_include_path(implode(PATH_SEPARATOR, array(
  13. realpath(APPLICATION_PATH . '/../library'),
  14. )));
  15.  
  16. /** Zend_Application */
  17. require_once 'Zend/Application.php';
  18.  
  19. // Create application, bootstrap, and run
  20. $application = new Zend_Application(
  21. APPLICATION_ENV,
  22. APPLICATION_PATH . '/configs/application.ini'
  23. );
  24. $application->bootstrap()
  25.  


Drzewko projektu
  1. .
  2. |-- application
  3. | |-- Bootstrap.php
  4. | |-- configs
  5. | | `-- application.ini
  6. | |-- controllers
  7. | | |-- ErrorController.php
  8. | | `-- IndexController.php
  9. | |-- layouts
  10. | | `-- scripts
  11. | | `-- layout.phtml
  12. | |-- models
  13. | `-- views
  14. | |-- helpers
  15. | `-- scripts
  16. | |-- error
  17. | | `-- error.phtml
  18. | `-- index
  19. | `-- index.phtml
  20. |-- dawid.txt
  21. |-- library
  22. | `-- Zend -> ../../../Zend/library/Zend/
  23. |-- public
  24. | `-- index.php
  25. `-- tests
  26. |-- application
  27. | `-- bootstrap.php
  28. |-- library
  29. | `-- bootstrap.php
  30. `-- phpunit.xml
  31.  


Ten post edytował gummmibear 13.08.2009, 11:56:40
Go to the top of the page
+Quote Post
batman
post 13.08.2009, 12:15:27
Post #9





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Domyślam się, że brak ->run(); w index.php jest literówką, która zdarzyła się podczas kopiowania kodu.
Ostatnia rzecz jaka została do sprawdzenia, to czy w library masz plik Zend/Application/Bootstrap/Boostrap.php.
Jak okaże się, że plik jest, to nie wiem dlaczego Ci nie chce działać. Wszystko wydaje się być na swoim miejscu.


--------------------
I would love to change the world, but they won't give me the source code.
My software never has bugs. It just develops random features.
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: 14.06.2025 - 10:52