Обновление с 0.1.2 до 0.2

Залил файлы, отредактировал config.db.php, запускаю скрипт обновления — ошибки (см ниже), меняю данные в config.php на define('SYS_CACHE_DIR','/var/www/***/***/tmp/'); (тоесть на те что были раньше) — ошибки теже самые, подставляю вовсе старый config.php — тоже самое:
web1% sudo php /var/www/***/new/www/update/update_0.1.2_to_0.2.php
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(62) "Can't DROP 'comment_date_rating'; check that column/key exists"
string(35) "Duplicate key name 'rating_date_id'"
string(38) "Duplicate column name 'comment_delete'"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(43) "Duplicate column name 'topic_publish_index'"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(54) "Duplicate column name 'user_settings_notice_new_topic'"
string(56) "Duplicate column name 'user_settings_notice_new_comment'"
string(53) "Duplicate column name 'user_settings_notice_new_talk'"
string(58) "Duplicate column name 'user_settings_notice_reply_comment'"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(38) "Duplicate column name 'topic_cut_text'"
string(44) "Duplicate column name 'topic_forbid_comment'"
string(41) "Duplicate column name 'comment_text_hash'"
string(35) "Duplicate column name 'blog_avatar'"
string(40) "Duplicate column name 'blog_avatar_type'"
string(46) "Duplicate column name 'user_date_comment_last'"
string(55) "Duplicate column name 'user_settings_notice_new_friend'"
string(36) "Table 'prefix_friend' already exists"
string(38) "Duplicate entry '1' for key 'topic_id'"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(37) "Duplicate column name 'topic_publish'"
string(42) "Duplicate column name 'comment_count_last'"
string(53) "Can't DROP 'topic_text'; check that column/key exists"
string(59) "Can't DROP 'topic_text_short'; check that column/key exists"
string(60) "Can't DROP 'topic_text_source'; check that column/key exists"
PHP Notice:  Undefined index:  HTTP_HOST in /var/www/***/new/www/config/config.php on line 34

Notice: Undefined index:  HTTP_HOST in /var/www/***/new/www/config/config.php on line 34
PHP Warning:  session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/***/new/www/update/update_0.1.2_to_0.2.php:37) in /var/www/***/new/www/classes/modules/sys_session/Session.class.php on line 53

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/***/new/www/update/update_0.1.2_to_0.2.php:37) in /var/www/***/new/www/classes/modules/sys_session/Session.class.php on line 53
PHP Warning:  session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/***/new/www/update/update_0.1.2_to_0.2.php:37) in /var/www/***/new/www/classes/modules/sys_session/Session.class.php on line 53

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/***/new/www/update/update_0.1.2_to_0.2.php:37) in /var/www/***/new/www/classes/modules/sys_session/Session.class.php on line 53
п•я│п╩п╦ пҐп╦п╨п╟п╨п╦п╣ п╬я┬п╦п╠п╨п╦ пҐп╣ п©п╬п╡я▀п╩п╟пЇп╦п╩п╦, пЇпҐп╟я┤п╦я┌ п╟п©пЄп╣п╧я┌ пҐп╟ пҐп╬п╡я┐я▌ п╡п╣я─я│п╦я▌ п©я─п╬я┬п╣п╩ я┐я│п©п╣я┬пҐп╬. п÷п╬пЇпЄя─п╟п╡п╩я▐п╣п╪!%   

34 строка:
define('DIR_WEB_ROOT','http://'.$_SERVER['HTTP_HOST']);
define('DIR_STATIC_ROOT',DIR_WEB_ROOT); 
define('DIR_SERVER_ROOT',$_SERVER['DOCUMENT_ROOT']);
define('DIR_STATIC_SKIN',DIR_STATIC_ROOT.'/'.DIR_SMARTY_TEMPLATE);
define('DIR_UPLOADS','/uploads');
define('DIR_UPLOADS_IMAGES',DIR_UPLOADS.'/images');

При таком же раскладе вс работало.
Куда копнуть?

11 комментариев

avatar
попробовать запустить через http, т.е. через браузер. И желательно на чистую 0.1.2 и запускать только 1 раз
  • ort
  • +1
avatar
Залил рядом голую 0.2, запустил из браузера апдейтер:

string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(62) «Can't DROP 'comment_date_rating'; check that column/key exists» string(35) «Duplicate key name 'rating_date_id'» string(38) «Duplicate column name 'comment_delete'» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(43) «Duplicate column name 'topic_publish_index'» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(54) «Duplicate column name 'user_settings_notice_new_topic'» string(56) «Duplicate column name 'user_settings_notice_new_comment'» string(53) «Duplicate column name 'user_settings_notice_new_talk'» string(58) «Duplicate column name 'user_settings_notice_reply_comment'» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(38) «Duplicate column name 'topic_cut_text'» string(44) «Duplicate column name 'topic_forbid_comment'» string(41) «Duplicate column name 'comment_text_hash'» string(35) «Duplicate column name 'blog_avatar'» string(40) «Duplicate column name 'blog_avatar_type'» string(46) «Duplicate column name 'user_date_comment_last'» string(55) «Duplicate column name 'user_settings_notice_new_friend'» string(36) «Table 'prefix_friend' already exists» string(38) «Duplicate entry '1' for key 'topic_id'» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6c772' (errno: 121)» string(37) «Duplicate column name 'topic_publish'» string(42) «Duplicate column name 'comment_count_last'» string(53) «Can't DROP 'topic_text'; check that column/key exists» string(59) «Can't DROP 'topic_text_short'; check that column/key exists» string(60) «Can't DROP 'topic_text_source'; check that column/key exists»
Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'cache_dir must be a directory' in /var/www/***/new/www/test/classes/lib/external/DklabCache/Zend/Cache.php:141 Stack trace: #0 /var/www/***/new/www/test/classes/lib/external/DklabCache/Zend/Cache/Backend/File.php(146): Zend_Cache::throwException('cache_dir must ...') #1 /var/www/***/new/www/test/classes/lib/external/DklabCache/Zend/Cache/Backend/File.php(121): Zend_Cache_Backend_File->setCacheDir('777/') #2 /var/www/***/new/www/test/classes/modules/sys_cache/Cache.class.php(71): Zend_Cache_Backend_File->__construct(Array) #3 /var/www/***/new/www/test/classes/engine/Engine.class.php(68): Cache->Init() #4 /var/www/***/new/www/test/config/config.ajax.php(29): Engine->InitModules() #5 /var/www/***/new/www/test/update/update_0.1.2_to_0.2.php(137): require_once('/var/www/serpuh...') #6 {main} thrown in /var/www/***/new/www/test/classes/lib/external/DklabCache/Zend/Cache.php on line 141
avatar
Потом захожу на сайт (главную страницу) и наблюдаю ошибку об отсутствии диры /templates/compiled, дал ей права 777, запускаю апдейтер по новой:

string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(62) «Can't DROP 'comment_date_rating'; check that column/key exists» string(35) «Duplicate key name 'rating_date_id'» string(38) «Duplicate column name 'comment_delete'» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(43) «Duplicate column name 'topic_publish_index'» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(54) «Duplicate column name 'user_settings_notice_new_topic'» string(56) «Duplicate column name 'user_settings_notice_new_comment'» string(53) «Duplicate column name 'user_settings_notice_new_talk'» string(58) «Duplicate column name 'user_settings_notice_reply_comment'» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(38) «Duplicate column name 'topic_cut_text'» string(44) «Duplicate column name 'topic_forbid_comment'» string(41) «Duplicate column name 'comment_text_hash'» string(35) «Duplicate column name 'blog_avatar'» string(40) «Duplicate column name 'blog_avatar_type'» string(46) «Duplicate column name 'user_date_comment_last'» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(55) «Duplicate column name 'user_settings_notice_new_friend'» string(36) «Table 'prefix_friend' already exists» string(38) «Duplicate entry '1' for key 'topic_id'» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6c89b' (errno: 121)» а�б�аЛаИ аНаИаКаАаКаИаЕ аОб�аИаБаКаИ аНаЕ аПаОаВб�аЛаАаЗаИаЛаИ, аЗаНаАб�аИб� аАаПаДаЕаЙб� аНаА аНаОаВб�б� аВаЕб�б�аИб� аПб�аОб�аЕаЛ б�б�аПаЕб�аНаО. а�аОаЗаДб�аАаВаЛб�аЕаМ!
avatar
Добился того, что на главную заходит, всё работает, но нет содержимого топиков.
Ошибки при апдейте в браузере были вот такими:

string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(62) «Can't DROP 'comment_date_rating'; check that column/key exists» string(35) «Duplicate key name 'rating_date_id'» string(38) «Duplicate column name 'comment_delete'» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(43) «Duplicate column name 'topic_publish_index'» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(54) «Duplicate column name 'user_settings_notice_new_topic'» string(56) «Duplicate column name 'user_settings_notice_new_comment'» string(53) «Duplicate column name 'user_settings_notice_new_talk'» string(58) «Duplicate column name 'user_settings_notice_reply_comment'» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(38) «Duplicate column name 'topic_cut_text'» string(44) «Duplicate column name 'topic_forbid_comment'» string(41) «Duplicate column name 'comment_text_hash'» string(35) «Duplicate column name 'blog_avatar'» string(40) «Duplicate column name 'blog_avatar_type'» string(46) «Duplicate column name 'user_date_comment_last'» string(55) «Duplicate column name 'user_settings_notice_new_friend'» string(36) «Table 'prefix_friend' already exists» string(38) «Duplicate entry '1' for key 'topic_id'» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(52) «Can't create table 'new.#sql-48b_6cbec' (errno: 121)» string(37) «Duplicate column name 'topic_publish'» string(42) «Duplicate column name 'comment_count_last'» string(53) «Can't DROP 'topic_text'; check that column/key exists» string(59) «Can't DROP 'topic_text_short'; check that column/key exists» string(60) «Can't DROP 'topic_text_source'; check that column/key exists» а�б�аЛаИ аНаИаКаАаКаИаЕ аОб�аИаБаКаИ аНаЕ аПаОаВб�аЛаАаЗаИаЛаИ, аЗаНаАб�аИб� аАаПаДаЕаЙб� аНаА аНаОаВб�б� аВаЕб�б�аИб� аПб�аОб�аЕаЛ б�б�аПаЕб�аНаО. а�аОаЗаДб�аАаВаЛб�аЕаМ!
avatar
Просьба подсказать, как исправить ошибки типа:
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"
string(62) "Can't DROP 'comment_date_rating'; check that column/key exists"
string(35) "Duplicate key name 'rating_date_id'"
string(38) "Duplicate column name 'comment_delete'"
string(52) "Can't create table 'new.#sql-48b_6a906' (errno: 121)"

вызываемые при запуске апдейтера?
avatar
запускать update_0.1.2_to_0.2.php нужно в принципе только один раз. Разверни заново БД 0.1.2 и выполни апдейт.
  • ort
  • 0
avatar
Я каждый раз запускаю апдейтер с БД от 0.1.2, задампленной заранее.
avatar
если бы это было так, то мы не наблюдали бы ошибок вида:
Duplicate column name 'comment_delete'
это ошибка говорит о том, что поле comment_delete уже есть в таблице, хотя в 0.1.2 такого поля нет.
Делай вывод.
avatar
Возможно раньше с 0.1.2 возился…
Что за ошибки тогда: string(52) «Can't create table 'new.#sql-48b_6a906' (errno: 121)»

Спасибо.
avatar
теперь могут быть любые глюки и ошибки, т.к. мне не известно, что ты менял в движке
возможно он не может создать внешние ключи
avatar
Как же мне быть?
Повторюсь, сейчас добился того, что после обновления всё есть, но текста в топиках нет. Может вручную изменить структуру БД?
Только зарегистрированные и авторизованные пользователи могут оставлять комментарии.