Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZF]Zend_DB Zend_DB_Table
PawelC
post
Post #1





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

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


Witam, mam taki problem, postanowiłem wrzucić Zenda na serwer www. I już na samym starcie same błędy, mając taką zawartość w index.php wszystko działa elegancko:
  1. <?php
  2. error_reporting(E_ALL|E_STRICT);
  3. date_default_timezone_set('Europe/London');
  4. set_include_path('.' . PATH_SEPARATOR . './library'
  5. . PATH_SEPARATOR . './application/models/'
  6. . PATH_SEPARATOR . get_include_path());
  7.  
  8. include "Zend/Application.php";
  9. include "Zend/Loader.php";
  10. Zend_Loader::loadClass('Zend_Controller_Front');
  11. Zend_Loader::loadClass('Zend_Layout');
  12. //te też nie działają
  13. //Zend_Loader::loadClass('Zend_DB');
  14. //Zend_Loader::loadClass('Zend_DB_Table');
  15. Zend_Loader::loadClass('Zend_Registry');
  16. Zend_Loader::loadClass('Zend_Config_Ini');
  17.  
  18. //MVC Start
  19. Zend_Layout::startMvc('./application/views/layouts');
  20.  
  21. //Zend Config
  22. $config=new Zend_Config_Ini('./application/config.ini','general');
  23. $registry=Zend_Registry::getInstance();
  24. $registry->set('config',$config);
  25.  
  26. //to nie działa
  27. //Database config
  28. //$db=Zend_Db::factory($config->db->adapter, $config->db->config->toArray());
  29. //Zend_Db_Table::setDefaultAdapter($db);
  30. //Zend_Db_Table_Abstract::setDefaultAdapter($db);
  31.  
  32. // setup controller
  33. $frontController = Zend_Controller_Front::getInstance();
  34. $frontController->throwExceptions(true);
  35. $frontController->setControllerDirectory('./application/controllers');
  36.  
  37. // run!
  38. $frontController->dispatch();
Natomiast jeżeli odkomentuje Zend::Loader('Zend_DB') i Zend_DB_Table + kod gdzie ustawia się jako domyślny adapter wywala mi error: http://www.menadzer-zaplecza.pl/
Wie ktoś jak temu zaradzić, zaznaczam że na localu wszystko mi śmiga dobrze, na serwerze już nie.
Go to the top of the page
+Quote Post

Posty w temacie


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: 26.09.2025 - 04:42