Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

2 Stron V   1 2 >  
Reply to this topicStart new topic
> [ZendFramework][Zend] Problem z odpaleniem projektu na localu
Warcabiak
post 8.12.2017, 11:36:06
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Mam pewien problem, skopiowałem cały projekt z serwera ftp i chciałem go postawić na localhoscie.
Na początku mialem problem z cache_dir, ale w pliku File.php wstawiłełem na sztywno ścieżkę do folderu (setCacheDir(ścieżka)) i po tej zmianie nagle miałem białą stronę (nic w źródle, ani w konsoli).

Włączyłem debugera przez wpisanie odpowiednich linijek kodu w index.php i pojawiły się następujące komunikaty:


  1. Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in C:\folder\app\lib\Zend\Loader.php on line 266
  2.  
  3. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Template_Lite has a deprecated constructor in C:\folder\app\lib\Tlite\class.template.php on line 31
  4.  
  5. Notice: Undefined index: ICCAPP in C:\folder\app\lib\Icc\Plugs\App\View.php on line 18
  6.  
  7. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  8.  
  9. Notice: Undefined property: Strony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  10.  
  11. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  12.  
  13. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\models\Strony.php on line 31
  14.  
  15. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  16.  
  17. Notice: Undefined property: Miasto::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  18.  
  19. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  20.  
  21. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\models\Miasto.php on line 15
  22.  
  23. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  24.  
  25. Notice: Undefined property: Partner::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  26.  
  27. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  28.  
  29. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\models\Partner.php on line 23
  30.  
  31. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\models\Partner.php on line 23
  32.  
  33. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  34.  
  35. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  36.  
  37. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  38.  
  39. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  40.  
  41. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  42.  
  43. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  44.  
  45. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  46.  
  47. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  48.  
  49. Notice: Accessing static property News::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  50.  
  51. Notice: Undefined property: News::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  52.  
  53. Notice: Accessing static property News::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  54.  
  55. Notice: Accessing static property News::$_db as non static in C:\folder\app\models\News.php on line 16
  56.  
  57. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  58.  
  59. Notice: Undefined property: Rekomendacje::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  60.  
  61. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  62.  
  63. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\models\Rekomendacje.php on line 10
  64.  
  65. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\models\Rekomendacje.php on line 11
  66.  
  67. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  68.  
  69. Notice: Undefined property: ElementyTypuStrony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  70.  
  71. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  72.  
  73. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\models\ElementyTypuStrony.php on line 15
  74.  
  75. Notice: Accessing static property ParametryStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  76.  
  77. Notice: Undefined property: ParametryStrony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  78.  
  79. Notice: Accessing static property ParametryStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  80.  
  81. Fatal error: TPL: [in line 0]: syntax error: file 'render/start.tpl' does not exist in C:\folder\app\lib\Tlite\class.template.php on line 923



Same Notice i na końcu Fatal error. Wiecie jak naprawić problem tej białej strony?


Dodam, że na serwerze ta strona działa bez zarzutów, problem jest przy próbie odpalenia jej lokalnie.

Ten post edytował Warcabiak 8.12.2017, 11:37:13
Go to the top of the page
+Quote Post
nospor
post 8.12.2017, 11:38:59
Post #2





Grupa: Moderatorzy
Postów: 36 447
Pomógł: 6292
Dołączył: 27.12.2004




Biala strone masz z powodu FATAL ERROR. Popraw go. Komunikat bledu jest dosc wyrazny


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
Warcabiak
post 8.12.2017, 11:50:28
Post #3





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Co najlepsze ten plik istnieje. :/
Go to the top of the page
+Quote Post
nospor
post 8.12.2017, 11:51:29
Post #4





Grupa: Moderatorzy
Postów: 36 447
Pomógł: 6292
Dołączył: 27.12.2004




Najwyrazniej istnieje, ale pod zla sciezka, ktorej php nie widzi. Pewnie musisz ustawic include path


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
Warcabiak
post 8.12.2017, 12:02:50
Post #5





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


To samo miałem z folderem cache.
Tylko gdzie powinienem zmienić te ścieżkę? W jakimś konkretnym pliku?
Go to the top of the page
+Quote Post
nospor
post 8.12.2017, 12:03:18
Post #6





Grupa: Moderatorzy
Postów: 36 447
Pomógł: 6292
Dołączył: 27.12.2004




w php.ini?


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
viking
post 8.12.2017, 12:08:08
Post #7





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


https://github.com/xorock/ZF1-Skeleton-PHPT...application.ini
Zarówno autoloader jak i ścieżki cache.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 8.12.2017, 12:30:23
Post #8





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Pierwszy raz mam do czynienia z tym projektem, wcześniej nie miałem styczności z zendem.

Nie ma tutaj ani pliku php.ini ani applicztion.ini w folderze cfg mam jedynie jakieś pliki konfiguracyjne z rozszerzeniem .xml
Go to the top of the page
+Quote Post
nospor
post 8.12.2017, 12:33:16
Post #9





Grupa: Moderatorzy
Postów: 36 447
Pomógł: 6292
Dołączył: 27.12.2004




php.ini to plik konfiguracyjny php a nie zenda. z php tez nie miales wczesniej stycznosci?


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
viking
post 8.12.2017, 12:35:12
Post #10





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Zatem właściwości powinieneś zmieniać w pliku xml. Sam sobie odpowiedziałeś. My nie znamy struktury.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 8.12.2017, 12:43:54
Post #11





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Zmieniłem te ściezki - nie ma już fatala, ale strona nadal nie działa. :/

  1. Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in C:\folder\app\lib\Zend\Loader.php on line 266
  2.  
  3. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Template_Lite has a deprecated constructor in C:\folder\app\lib\Tlite\class.template.php on line 31
  4.  
  5. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  6.  
  7. Notice: Undefined property: Strony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  8.  
  9. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  10.  
  11. Notice: Accessing static property Strony::$_db as non static in C:\folder\app\models\Strony.php on line 31
  12.  
  13. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  14.  
  15. Notice: Undefined property: Miasto::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  16.  
  17. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  18.  
  19. Notice: Accessing static property Miasto::$_db as non static in C:\folder\app\models\Miasto.php on line 15
  20.  
  21. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  22.  
  23. Notice: Undefined property: Partner::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  24.  
  25. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  26.  
  27. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\models\Partner.php on line 23
  28.  
  29. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\models\Partner.php on line 23
  30.  
  31. Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in C:\folder\app\lib\Tlite\class.compiler.php on line 159
  32.  
  33. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  34.  
  35. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  36.  
  37. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  38.  
  39. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  40.  
  41. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  42.  
  43. Notice: Undefined variable: old in C:\folder\app\lib\Icc\Utils\Filter.php on line 108
  44.  
  45. Notice: Accessing static property News::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  46.  
  47. Notice: Undefined property: News::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  48.  
  49. Notice: Accessing static property News::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  50.  
  51. Notice: Accessing static property News::$_db as non static in C:\folder\app\models\News.php on line 16
  52.  
  53. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  54.  
  55. Notice: Undefined property: Rekomendacje::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  56.  
  57. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  58.  
  59. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\models\Rekomendacje.php on line 10
  60.  
  61. Notice: Accessing static property Rekomendacje::$_db as non static in C:\folder\app\models\Rekomendacje.php on line 11
  62.  
  63. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  64.  
  65. Notice: Undefined property: ElementyTypuStrony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  66.  
  67. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  68.  
  69. Notice: Accessing static property ElementyTypuStrony::$_db as non static in C:\folder\app\models\ElementyTypuStrony.php on line 15
  70.  
  71. Notice: Accessing static property ParametryStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  72.  
  73. Notice: Undefined property: ParametryStrony::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  74.  
  75. Notice: Accessing static property ParametryStrony::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  76.  
  77. Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Template_Lite_Compiler has a deprecated constructor in C:\folder\app\lib\Tlite\class.compiler.php on line 27
  78.  
  79. Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in C:\folder\app\lib\Tlite\class.compiler.php on line 159
  80.  
  81. Notice: Accessing static property ParametryStrony::$_db as non static in C:\folder\app\models\ParametryStrony.php on line 12
  82.  
  83. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 69
  84.  
  85. Notice: Undefined property: Partner::$_db in C:\folder\app\lib\Icc\Model.php on line 69
  86.  
  87. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\lib\Icc\Model.php on line 70
  88.  
  89. Notice: Accessing static property Partner::$_db as non static in C:\folder\app\models\Partner.php on line 23
  90.  
  91. Notice: Undefined variable: ret in C:\folder\app\lib\Icc\Modules\MainPageBox.php on line 27
  92.  
  93. Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in C:\folder\app\lib\Tlite\class.compiler.php on line 159
  94.  
  95. Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in C:\folder\app\lib\Tlite\class.compiler.php on line 159
Go to the top of the page
+Quote Post
viking
post 8.12.2017, 13:11:57
Post #12





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Dalej to już błędy programisty albo wynikające z nowszej wersji php.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 8.12.2017, 14:07:21
Post #13





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Dodam, że ta strona na serwerze działa poprawnie.

Problemy są gdy próbuje ją odpalić na localhoscie. :/
Go to the top of the page
+Quote Post
viking
post 8.12.2017, 14:15:42
Post #14





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Bo pewnie na serwerze są ukryte błedy.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 11.12.2017, 13:41:11
Post #15





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


no ale jak ukryje błędy to mam białą stronę, a an serwerze działającą stronę.
już nie wiem w czym może leżeć problem... :/
Go to the top of the page
+Quote Post
viking
post 11.12.2017, 13:52:25
Post #16





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Pisałem, porównaj wersje PHP. Na serwerze jest pewnie jakiś staroć.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 11.12.2017, 15:04:46
Post #17





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Na serwerze jest PHP 5.2, a u siebie mam 7.

Czy możliwe, że przez to może nie działać?
Chyba gdyby było na odwrót to mógłby być problemy.
Jak to Jest?
Go to the top of the page
+Quote Post
viking
post 11.12.2017, 15:11:17
Post #18





Grupa: Zarejestrowani
Postów: 6 365
Pomógł: 1114
Dołączył: 30.08.2006

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


Dokładnie przez to nie działa.


--------------------
Go to the top of the page
+Quote Post
Warcabiak
post 18.12.2017, 14:41:37
Post #19





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 28.04.2017

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


Wersja PHP nie rozwiązała problemu (jest widoczna strona, ale bez css'ów, itp.) prawdopodobnie to jakiś problem z bazą danych, jeden błąd pokazuje tu:

  1. public function __construct() {
  2. $this->_prefix = Zend_Registry::get('config')->database->dbprefix;
  3. if($this->_db === null)
  4. $this->_db = Zend_Registry::get('db');
  5. $this->_table_name = $this->_prefix . $this->_name;
  6. $this->_lang = $_SESSION['lang'];
  7. }


  1. Notice: Undefined property: Site::$_db in C:\xampp\htdocs\zend\app\lib\Icc\Model.php on line 69
  2. Notice: Undefined property: City::$_db in C:\xampp\htdocs\zend\app\lib\Icc\Model.php on line 69
  3. Notice: Undefined property: Partners::$_db in C:\xampp\htdocs\zend\app\lib\Icc\Model.php on line 69


Prawdopodobnie ma problem z pobieraniem nazw z bazy danych...

Ktoś wie jak to naprawić?
Go to the top of the page
+Quote Post
nospor
post 18.12.2017, 14:48:10
Post #20





Grupa: Moderatorzy
Postów: 36 447
Pomógł: 6292
Dołączył: 27.12.2004




Pokaz kod klasy Site


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post

2 Stron V   1 2 >
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: 20.04.2024 - 03:10