Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]ZendFramework problem z tutkiem
GreenGo
post
Post #1





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


Witam.
Korzystam z tego tutoriala: http://www.heavymind.net/zend-framework-tutorial/
I jestem na etapie kiedy to powinny mi się wyświetlić 2 albumy z bazy danych.
Niestety nic się nie wyświetla (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) Jak wchodze na http://localhost/zf-tutorial/ to jest biała strona i nie ma żadnego źródła.
Jak wejdę na http://localhost/zf-tutorial/index.php to index.php chce mi się zapisać na dysku.

Czego to jest wina ? Robiłem wszystko po kolei jak w tutku.

Na prawdę nikt nie wie ?
Może to jest wina tego, że korzystam z serwera XAMPP ?
Powód edycji: [erix] przeniosłem
Go to the top of the page
+Quote Post
blooregard
post
Post #2


Newsman


Grupa: Moderatorzy
Postów: 2 033
Pomógł: 290
Dołączył: 21.12.2007
Skąd: Łódź




error_reporting, kolego, error_reporting...

Aha, i jeszcze jedno: error_reporting

I nie zapomnij o error_reporting !
Go to the top of the page
+Quote Post
phpion
post
Post #3





Grupa: Moderatorzy
Postów: 6 072
Pomógł: 861
Dołączył: 10.12.2003
Skąd: Dąbrowa Górnicza




Cytat(blooregard @ 8.03.2009, 23:21:44 ) *
error_reporting, kolego, error_reporting...

Aha, i jeszcze jedno: error_reporting

I nie zapomnij o error_reporting !

Samo error_reporting nic ci nie da jeśli masz wyłączone wyświetlanie błędów (ini_set('display_errors', '1')).
Go to the top of the page
+Quote Post
kosmowariat
post
Post #4





Grupa: Zarejestrowani
Postów: 235
Pomógł: 17
Dołączył: 18.07.2007
Skąd: Białystok

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


a kolega ma wogóle odpalony interpreter php ? Podejrzewam że nie. Dlatego jeśli wchodzisz na http://localhost/zf-tutorial/index.php chce Ci zapisac plik. A jako że pewnie jest no-index dlatego http://localhost/zf-tutorial/ daje czystą stronę. Od siebie mogę jedynie polecic xampp'a ;-)
Go to the top of the page
+Quote Post
GreenGo
post
Post #5





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


Dobra zainstalowałem WAMP`a i w sumie częściowo wszystko śmiga. Znaczy się www.zft1.local wyświetla albumy ale jeśli chcę dodać nowy/ edytować / usunąć to wyświetla mi się komunikat:

Kod
Not Found

The requested URL /index/edit/id/1 was not found on this server.


WAMP konfigurowany wg tutka z tej samej strony.
Jakieś pomysły ?
Go to the top of the page
+Quote Post
kosmowariat
post
Post #6





Grupa: Zarejestrowani
Postów: 235
Pomógł: 17
Dołączył: 18.07.2007
Skąd: Białystok

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


mod_rewrite też odpal i dodaj htaccess'a jeśli go nie masz ;]
Go to the top of the page
+Quote Post
GreenGo
post
Post #7





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


w .htaccess mam
Kod
RewriteEngine On
RewriteRule .* index.php

php_flag magic_quotes_gpc off
php_flag register_globals off


W pliku httpd.conf Apacha, mam linijkę z mod_rewrite włączoną.

Co jeszcze moze być nie tak ?

Ten post edytował GreenGo 10.03.2009, 17:09:12
Go to the top of the page
+Quote Post
artur_dziocha
post
Post #8





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


masz załadowany moduł mod_rewite?? Sprawdź za pomocą phpinfo() w Loaded modules powinienes mieć wśród załadowanych modułów mod_rewrite
na framework.zend.com masz 3 videotutoriale, szybki start i podobne i poustawiaj wszystko wedlug tamtych poradników(index.php, bootstrap)
jeśli przerobisz tamto będziesz juz mniej więcej wiedział co i jak
Go to the top of the page
+Quote Post
GreenGo
post
Post #9





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


Moduł mod_rewrite wg. phpinfo() mam załadowany. Obejrzałem te video tutoriale i jakoś nie ma tam nic inaczej co by mogło wpłynąć na brak działania mod_rewrite :/

Może coś jeszcze trzeba konfigurować w WAMP`ie ?

Jeszcze zamieszcze mój index.php, może tu coś jest źle :|
  1. <?php
  2.    error_reporting(E_ALL|E_STRICT);
  3.    ini_set('display_errors', 'on');
  4.    
  5.     date_default_timezone_set('Europe/London');
  6.  
  7.    set_include_path('.' . PATH_SEPARATOR . './library'
  8.        . PATH_SEPARATOR . './application/models/'
  9.        . PATH_SEPARATOR . get_include_path());
  10.  
  11.    include "Zend/Loader.php";
  12.  
  13.    Zend_Loader::loadClass('Zend_Controller_Front');
  14.    Zend_Loader::loadClass('Zend_Config_Ini');
  15.    Zend_Loader::loadClass('Zend_Registry');
  16.    Zend_Loader::loadClass('Zend_Db');
  17.    Zend_Loader::loadClass('Zend_Db_Table');
  18.  
  19.    // load configuration
  20.    $config = new Zend_Config_Ini('./application/config.ini', 'general');
  21.    $registry = Zend_Registry::getInstance();
  22.    $registry->set('config', $config);
  23.  
  24.    // setup database
  25.    $db = Zend_Db::factory( $config->db->adapter,
  26.    $config->db->config->toArray() );
  27.    Zend_Db_Table::setDefaultAdapter($db);
  28.  
  29.    // setup controller
  30.    $frontController = Zend_Controller_Front::getInstance();
  31.    $frontController->throwExceptions(true);
  32.    $frontController->setParam('useDefaultControllerAlways', true);
  33.    $frontController->setControllerDirectory('./application/controllers');
  34.  
  35.    // run!
  36.    $frontController->dispatch();
  37. ?>


Ten post edytował GreenGo 10.03.2009, 17:50:25
Go to the top of the page
+Quote Post
artur_dziocha
post
Post #10





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


a przerobiłeś te tutoriale??
przerobiłeś QuickStart
chyba po to Ci napisałem żebys je przerobił
jeżeli tamto Ci nie bedzie działalo to pomyślimy:)
Go to the top of the page
+Quote Post
GreenGo
post
Post #11





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


Witam.
Ostatnio nie miałem czasu w tym siedzieć więc dopiero teraz do tego wróciłem.

Zacząłem wykonywać skrypt tak jak w tych video tutorialach i po zakończeniu drugiego wyskakuje mi:

  1. <?php
  2. Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in F:wwwzft1demo_appindex.php on line 6
  3.  
  4. Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='.;C:php5pear') in F:wwwzft1demo_appindex.php on line 6
  5. ?>


Nie wiem co z tym zrobić.
Go to the top of the page
+Quote Post
artur_dziocha
post
Post #12





Grupa: Zarejestrowani
Postów: 320
Pomógł: 53
Dołączył: 18.09.2007
Skąd: Radom

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


pewnie coś nie tak z set_include_path() na początku index.php. Sprawdzczy dobrze Ci wskazuje na biblioteki Zenda
Go to the top of the page
+Quote Post
GreenGo
post
Post #13





Grupa: Zarejestrowani
Postów: 265
Pomógł: 4
Dołączył: 30.08.2004

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


Dobra daruje sobie te video tutki. Ale problem ciągle jest mod_rewrite :/ Po zrobieniu tutka z heavymind pierwsza strona się wyświetla a reszta nie, index/index też nie działa (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

EDIT: Ok ale głupi błąd zrobiłem :] 2 moje htaccess`y były bez kropki na początku dlatego nie działało (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)

Ten post edytował GreenGo 20.03.2009, 19:32:45
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 24.12.2025 - 00:49