SCJ >> TCMS

Post Reply
support@serverel.com
Posts: 87
Joined: Wed Aug 24, 2016 1:27 pm

SCJ >> TCMS

Post by support@serverel.com »

Здравствуйте.
Производим обновление скрипта до TCMS для мастер слейва
Основные шаги:
1. Конвертируем базу в innodb
2. Обновляем до 52

Code: Select all

env HTTP_HOST=xxx.com php update.php 52
3. Переключили сайт с 5.6 на 7.2
4. Установили TCMS

Code: Select all

curl -sS http://smartcj.com/updates2/install | php7.2 --
5. В конфиге сменили tcms/include/config.php

Code: Select all

 $config[«php_path»] = «/usr/bin/php7.2»;
и кроны тоже прописали с указанием версии php
6. Делаем конверт:

Code: Select all

php7.2 scj_1to2_db_converter.php 
SCJ v1 Host: localhost

SCJ v1 Username: xxx 

SCJ v1 Password: xxx

SCJ v1 DB name: xxx

Type 'md5' if you want gallery slugs to be gallery_md5 or just hit enter 

Copy traders (11.893393993378, 11.893393993378) 
Coping table admins (11.966200113297, 0.072806119918823) 
Coping table admin_access_log (11.969173192978, 0.0029730796813965) 
Coping table admin_sessions (11.972372055054, 0.0031988620758057) 
Coping table blacklist (11.975140094757, 0.0027680397033691) 
Coping table browsers (11.97913312912, 0.003993034362793) 
Coping table forces (12.083521127701, 0.10438799858093) 
Coping table functions_data (12.086716175079, 0.00319504737854) 
Coping table ga_categories (12.090289115906, 0.003572940826416) 
Coping table ga_sites (12.092734098434, 0.0024449825286865) 
Coping table inrules (12.0958340168, 0.0030999183654785) 
Coping table ips (12.09777712822, 0.0019431114196777) 
Coping table language (12.352229118347, 0.25445199012756) 
Coping table links (12.412868022919, 0.060638904571533) 
Coping table outrules (12.561680078506, 0.14881205558777) 
Coping table out_ips (12.56484413147, 0.0031640529632568) 
Coping table out_ips2trader (12.719632148743, 0.15478801727295) 
Coping table quality_settings (12.767691135406, 0.048058986663818) 
Coping table refs (12.769782066345, 0.0020909309387207) 
Coping table reports (12.831301212311, 0.061519145965576) 
Coping table rot_cell_data (12.833578109741, 0.0022768974304199) 
Coping table rot_cell_skimming (12.900286197662, 0.066708087921143) 
Coping table rot_groups (12.90309214592, 0.0028059482574463) 
Coping table rot_groups_data (12.906440019608, 0.0033478736877441) 
Coping table rot_models (12.909738063812, 0.0032980442047119) 
Coping table rot_models_data (12.911929130554, 0.0021910667419434) 
Coping table rot_sponsors (12.915205001831, 0.0032758712768555) 
Coping table rot_sponsors_data (12.919927120209, 0.0047221183776855) 
Coping table rot_crop_profiles (12.93107509613, 0.011147975921631) 
Coping table rot_pages (12.933356046677, 0.0022809505462646) 
Coping table rot_replacements (12.940014123917, 0.0066580772399902) 
Coping table rot_import_sets (12.942597150803, 0.0025830268859863) 
Coping table rot_search_queries (12.944283008575, 0.0016858577728271) 
Coping table rot_servers (12.979331016541, 0.035048007965088) 
Coping table rot_users (12.983553171158, 0.0042221546173096) 
Coping table skim_rules (12.985435009003, 0.0018818378448486) 
Coping table tds_rules (12.987097024918, 0.001662015914917) 
Coping table tds_schemes (12.989302158356, 0.0022051334381104) 
Coping table toplists (12.991114139557, 0.0018119812011719) 
Coping table trader_groups (12.993345022202, 0.0022308826446533) 
Copy settings (15.692860126495, 2.6995151042938) 
Copy rotation settings (15.730909109116, 0.038048982620239) 
Coping galleries DB. Total galleries: 2345 (15.749266147614, 0.018357038497925) 
100 (shift 10000) 
200 (shift 10000) 
300 (shift 10000) 
400 (shift 10000) 
500 (shift 10000) 
600 (shift 10000) 
700 (shift 10000) 
800 (shift 10000) 
900 (shift 10000) 
1000 (shift 10000) 
1100 (shift 10000) 
1200 (shift 10000) 
1300 (shift 10000) 
1400 (shift 10000) 
1500 (shift 10000) 
1600 (shift 10000) 
1700 (shift 10000) 
1800 (shift 10000) 
1900 (shift 10000) 
2000 (shift 10000) 
2100 (shift 10000) 
2200 (shift 10000) 
2300 (shift 10000) 
last batch, exit .. (38.408820152283, 22.659554004669) 
7.После чего, правим пути в .htaccess, к примеру если была папка, SCJ то надо сменить её на новую, к примеру TCMS. Далее меняем симлинки на файлы index.php out.php common.php , там тоже меняется путь.

На данном этапе сайт работает.
9. В админке видим ошибку memcached, подключаем его в конфиге скрипта:

Code: Select all

$config['memcached_host'] = '127.0.0.1';
$config['memcached_port'] = '11211';
И получаем на главное странице данную ошибку:

Code: Select all

Fatal error: Uncaught Exception: Mysql error:: 1146 (Table 'xxx.rot_gallery_stats' doesn't exist) (db_link) in query SELECT gs.thumb_id, gi.sponsor_id, gi.url, gi.crop_profile_id, gi.content_count, gt.thumb_url, gs.total_shows, gs.total_ctr, gd.alt, gd.description, gd.custom_var1, gd.custom_var2, gd.custom_var3 FROM rot_gallery_info AS gi JOIN rot_gallery_stats as gs on gs.gallery_id = gi.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gi.gallery_id JOIN rot_thumbs AS gt ON gt.thumb_id = gs.thumb_id WHERE gi.gallery_type = 1 and gi.source_url = '' /* site_id */ and content_type = '0' /* set_id */ . (xxx.com) in /home/sites/sites/xxx.com/asdlk2/includes/db_modules/mysql.php:129 Stack trace: #0 /home/sites/sites/xxx.com/asdlk2/includes/db_modules/mysql.php(160): db_error('SELECT gs.thumb...', 1146, 'Table 'xxx...', 'db_link') #1 /home/sites/sites/xxx.com/asdlk2/includes/libs/tpl_functions.php(626): db_query('SELECT gs.thumb...', 'db_link') #2 /home/sites/sites/xxx.com/asdlk2/tube/index.php(1258): load_categories('name', 0, '', '', 1) #3 /home/sites/sites/xxx.com/asdlk2/tube/index.php(215): preload_cache() #4 /home/sites/sites/xxx.com/asdlk2/cgi/index.php(384): unknown() #5 {main} thrown in /home/sites/sites/xxx.com/asdlk2/includes/db_modules/mysql.php on line 129 
Таблицы rot_gallery_stats нет в базе. Видимо её не конвертирует со сторой базы. Можете подсказать, что не так?
ошибок со стороны ПО не обнаружили.
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: SCJ >> TCMS

Post by admin »

Приветствую!

Достаточно скинуть кеш и будет все ок.
Don't forget to run script update
support@serverel.com
Posts: 87
Joined: Wed Aug 24, 2016 1:27 pm

Re: SCJ >> TCMS

Post by support@serverel.com »

Да, действительно. Ошибку исправило. Спасибо.
admin
Site Admin
Posts: 37241
Joined: Wed Sep 10, 2008 11:43 am

Re: SCJ >> TCMS

Post by admin »

NP
Don't forget to run script update
Post Reply