aika Posted December 8, 2015 Report Share Posted December 8, 2015 (edited) Tika pārcelts esošs Kohanas projekts uz jaunu vietu, vienīgais kas izmainījās - PHP 5.5 (bija 5.3) projekts brēc: Database_Exception [ 0 ]: [0] MODPATH/database/classes/kohana/database/mysql.php [ 67 ] 62 catch (ErrorException $e) 63 { 64 // No connection exists 65 $this->_connection = NULL; 66 67 throw new Database_Exception(mysql_errno(), '[:code] :error', array( 68 ':code' => mysql_errno(), 69 ':error' => mysql_error(), 70 )); 71 } 72 MODPATH/database/classes/kohana/database/mysql.php [ 158 ] » Kohana_Database_MySQL->connect() 153 } 154 155 public function query($type, $sql, $as_object = FALSE, array $params = NULL) 156 { 157 // Make sure the database is connected 158 $this->_connection or $this->connect(); utt Google nepalīdz! ar konekcijas parametriem (db;users) viss kārtībā, pārbaudīts. Plz help! Edited December 8, 2015 by aika Link to comment Share on other sites More sharing options...
aika Posted December 8, 2015 Author Report Share Posted December 8, 2015 stokowerflovā ieteiktais fix: error_reporting(E_ALL ^ (E_WARNING | E_DEPRECATED)); ieveda Redirect Loopā Link to comment Share on other sites More sharing options...
aika Posted December 8, 2015 Author Report Share Posted December 8, 2015 Ir, bet strādā jau error_reporting(E_ALL ^ (E_WARNING | E_DEPRECATED)); teorētiski to izolē! Link to comment Share on other sites More sharing options...
Val Posted December 8, 2015 Report Share Posted December 8, 2015 Tad jau noteikti šo postu arī redzēji? http://stackoverflow.com/a/25241528 Link to comment Share on other sites More sharing options...
aika Posted December 9, 2015 Author Report Share Posted December 9, 2015 (edited) OK, pieliku MySQLi moduli, diemžēl šobrīd pats modulis izsauc kļūdu: public function disconnect() { try { // Database is assumed disconnected $status = TRUE; if ($this->_connection instanceof mysqli) { if ($status = $this->_connection->close()) { // Clear the connection $this->_connection = NULL; } } parent::disconnect(); } catch (Exception $e) { // Database is probably not disconnected $status = ! ($this->_connection instanceof mysqli); } return $status; } Error logos strīpā birst: PHP Fatal error: Cannot call abstract method Kohana_Database::disconnect() . Atsauce uz koda fragmentu (augšā), 123 rindu: parent::disconnect(); Plīz fix! Edited December 9, 2015 by aika Link to comment Share on other sites More sharing options...
jurchiks Posted December 9, 2015 Report Share Posted December 9, 2015 Vecīt, tur tak skaidri un gaiši pateikts, kur problēma! Ja tu tik skaidrus error message nesaproti, tad programmēšana nav priekš tevis. Link to comment Share on other sites More sharing options...
rpr Posted December 9, 2015 Report Share Posted December 9, 2015 Vienkārši nomaini error_reporting uz E_ALL un salabo kļūdas. Link to comment Share on other sites More sharing options...
aika Posted December 9, 2015 Author Report Share Posted December 9, 2015 (edited) Vecīt, tur tak skaidri un gaiši pateikts, kur problēma! Ja tu tik skaidrus error message nesaproti, tad programmēšana nav priekš tevis. Jā man OOP nav priekš manis pagaidām! Ņemot vērā ka modulis ņemts 1:1 no autora, kā lai es zinu kur viņš ir sapisies meistarībā?! Galu galā, projekts strādāja uz 5.3, es palīdzu tikai pārcelt uz jaunu hostu! Ne mans projekts, ne mans lauciņš! Edited December 9, 2015 by aika Link to comment Share on other sites More sharing options...
jurchiks Posted December 9, 2015 Report Share Posted December 9, 2015 Šai kļūdai šajā modulī 100% bija jābūt arī uz PHP 5.3. Link to comment Share on other sites More sharing options...
aika Posted December 9, 2015 Author Report Share Posted December 9, 2015 Šai kļūdai šajā modulī 100% bija jābūt arī uz PHP 5.3. Ja Tu palasītu visu topiku, redzētu, ka šis modulis pirms tam nebija, jo PHP 5.3 nelamājas par mysql_* . Modulis tika pievienots pēc Val ieteikuma. Link to comment Share on other sites More sharing options...
Kavacky Posted December 9, 2015 Report Share Posted December 9, 2015 Izdzēs to rindu ar "parent::disconnect()". Link to comment Share on other sites More sharing options...
aika Posted December 9, 2015 Author Report Share Posted December 9, 2015 Labi , tad atgriežamies pie sākuma problēmas: kaut kas izsauc jebkura requesta pāriešanu uz http://lapa.lv/lv/notikums, kas acīmredzot pats izsauc kaut kādu kļūdu , līdz ar to ieejam redirectu loopā! bootstrapa error routes : Route::set('error', 'error/<action>(/<message>)', array('action' => '[0-9]++', 'message' => '.+')) ->defaults(array( 'controller' => 'error_handler' )); defaultās routess nav; Kohana::init(array( 'base_url' => '/', 'index_file' => FALSE, 'errors' => TRUE, )); kā man noķert to blusu, kas routē visu uz /lv/notikums/ ?! Link to comment Share on other sites More sharing options...
e-remit Posted December 9, 2015 Report Share Posted December 9, 2015 Vecajā 5.3 versijā gadījumā nebija vispār izslēgts error reportings? Link to comment Share on other sites More sharing options...
aika Posted December 9, 2015 Author Report Share Posted December 9, 2015 bootsrapa 'errors' => FALSE un index.php error_reporting(0) nepalīdz Link to comment Share on other sites More sharing options...
jurchiks Posted December 9, 2015 Report Share Posted December 9, 2015 Tu tagad izdarīji pilnīgi pretējo un izslēdzi visus erorus... Link to comment Share on other sites More sharing options...
Recommended Posts