2.2.9 to 2.2.13 upgrade woe

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

2.2.9 to 2.2.13 upgrade woe

Post by paulbaker »

Trying to upgrade a site that's new to me - I don't know its history. Currently 2.2.9; trying to upgrade to 2.2.13.

The front end and back end both appear to work perfectly. Before upgrade I go to the module manager. I see lots of "Missing dependencies" & "This module is awaiting upgrade."

Still in the module manager I click Upgrade on a couple of modules and I see error "The CMSMS core must be upgraded before this operation can succeed. A problem occurred communicating with the module server."

I run an upgrade anyway. It appears to go smoothly but after the upgrade I get php 500 errors in both the front end and back end:

PHP Fatal error: Allowed memory size of 805306368 bytes exhausted

Would be grateful for any pointers as to how to successfully upgrade this site.

Thanks! O0

EDIT: I copied the system to another host and tried there but I get the same behaviour, so it's not the host which is the problem.

Original state:

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

Cms Version: 2.2.9

Installed Modules:

AdminSearch: 1.0.2
CGContentUtils: 2.1.5
CGExtensions: 1.53.13
CGHeadMaster: 1.0.9.2
CGSimpleSmarty: 2.1.4
CMSContentManager: 1.1.4
CmsJobManager: 0.1.2
DesignManager: 1.1.1
FileManager: 1.5.2
FilePicker: 1.0.2
Gallery: 2.1.6
JQueryTools: 1.3.9
MenuManager: 1.50.2
MicroTiny: 2.0.3
ModuleManager: 2.0.5
Navigator: 1.0.3
News: 2.50.6
Search: 1.50.2

Config Information:

php_memory_limit:
max_upload_size: 128000000
url_rewriting: mod_rewrite
page_extension: /
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: true

Php Information:

phpversion: 5.6.40
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 768M
max_execution_time: 300
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 128M
upload_max_filesize: 128M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)
Server Information:

Server Software: LiteSpeed
Server Api: litespeed
Server Os: Linux 2.6.32-954.3.5.lve1.4.59.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.1.40
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:

tmp: /home/patinaar/public_html/tmp (0755)
tmp_cache: /home/patinaar/public_html/tmp/cache (0755)
templates_c: /home/patinaar/public_html/tmp/templates_c (0755)
modules: /home/patinaar/public_html/modules (0755)
uploads: /home/patinaar/public_html/uploads (0755)
File Creation Mask (umask): /home/patinaar/public_html/tmp/cache (0755)
config_file: 0644
----------------------------------------------
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: 2.2.9 to 2.2.13 upgrade woe

Post by Jo Morg »

IMO the memory_limit: 768M is a bit too high for a site with, seemingly, not many reasons to exhaust it at all on an upgrade. So I would bet on a recursive issue on upgrading dependencies. I'd try the following:
  1. get rid of all the moduleinfo.ini files in the modules folders;
  2. go to the db and see if the modules versions match the ones in table: <prefix>modules;
  3. if there is a mismatch, match the one in the db to the one in the <module name>.module.php;
  4. check the dependencies again, they should not conflict now but if they do it is better to re-upload the expected dependencies and change the DB versions accordingly;
  5. upgrade any non core modules if needed;
  6. upgrade core;
These steps should do it (I hope) :). Oh and as usual keep backing up particularly before changing the DB!
Last edited by Jo Morg on Sun Mar 01, 2020 11:39 am, edited 1 time in total.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: 2.2.9 to 2.2.13 upgrade woe

Post by paulbaker »

Thanks Jo! I really appreciate your help. I took the 2.2.9 site and did steps 1, 2, 3. All modules needed a new version number in the database.

Step 4: now, no missing dependencies are showing in module manager, which is great! However.... on the module manager page I still get the error "A problem occurred communicating with the module server" at the top. And the only tabs showing are "Installed" and "Settings". No tabs for "n upgrades available", "search" and "available modules". Also no "Upgrade" links on this page.

How can I solve that issue?

I have not tried a core upgrade yet.

Latest system info:

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

Cms Version: 2.2.9

Installed Modules:

AdminSearch: 1.0.4
CGContentUtils: 2.2.3
CGExtensions: 1.61.5
CGHeadMaster: 1.0.14
CGSimpleSmarty: 2.2.1
CMSContentManager: 1.1.7
CmsJobManager: 0.1.3
DesignManager: 1.1.5
FileManager: 1.6.8
FilePicker: 1.0.3
Gallery: 2.3.2
JQueryTools: 1.4.0.4
MenuManager: 1.50.3
MicroTiny: 2.2.3
ModuleManager: 2.1.5
Navigator: 1.0.9
News: 2.51.4
Search: 1.51.6

Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: /
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Europe/London
permissive_smarty: true

Php Information:

phpversion: 7.2.28
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /opt/alt/php72/var/lib/php/session (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 60
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)
Server Information:

Server Software: Apache
Server Api: cgi-fcgi
Server Os: Linux 3.10.0-962.3.2.lve1.5.25.10.el7.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.1.44
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:

tmp: /home/cthuk/public_html/pa/tmp (0755)
tmp_cache: /home/cthuk/public_html/pa/tmp/cache (0755)
templates_c: /home/cthuk/public_html/pa/tmp/templates_c (0755)
modules: /home/cthuk/public_html/pa/modules (0755)
uploads: /home/cthuk/public_html/pa/uploads (0755)
File Creation Mask (umask): /home/cthuk/public_html/pa/tmp/cache (0755)
config_file: 0644
----------------------------------------------
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1922
Joined: Mon Jan 29, 2007 4:47 pm

Re: 2.2.9 to 2.2.13 upgrade woe

Post by Jo Morg »

paulbaker wrote:... on the module manager page I still get the error "A problem occurred communicating with the module server" at the top. And the only tabs showing are "Installed" and "Settings". No tabs for "n upgrades available", "search" and "available modules". Also no "Upgrade" links on this page.

How can I solve that issue?
That's a communication issue, the server may not have CURL enabled or the CMSMS repository may be temporarily unavailable while updating releases. I get that intermittently on some of my servers but usually is just a matter of waiting a bit and trying again. Otherwise enable CURL and check if there is no firewall on the server interfering. You can always check the <module name>.module.php files for dependencies and install them manually if needed.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: 2.2.9 to 2.2.13 upgrade woe

Post by paulbaker »

Thanks again. According to system info page, CURL is on and "version 7.62.0, minimum recommended version is 7.19.7."

Another site, in another sub-directory on the same domain, connects to the module server every time. So it can't be the server causing this.

Nothing of interest in the admin log or the PHP error log.

I turned on debug and the below is the info from the module manager page, don't think it casts any light though...

:-\

Code: Select all

Debug: (0.011959) - (net usage: 961904) - (peak: 1610992) Initialize Database
Debug: (0.017561) - (net usage: 1167816) - (peak: 1613240) Done Initializing Database
Debug: (0.017617) - (net usage: 1167976) - (peak: 1613240) initialize internal global cache
Debug: (0.021624) - (net usage: 1520376) - (peak: 1995880) done initializing global cache
Debug: (0.021683) - (net usage: 1519840) - (peak: 1995880) Loading Modules
Debug: (0.046174) - (net usage: 3335120) - (peak: 4012536) SET @CG_ZEROTIME = NOW() - INTERVAL 150 YEAR,@CG_FUTURETIME = NOW() + INTERVAL 5 YEAR
Debug: (0.054334) - (net usage: 3756368) - (peak: 4256160) SELECT username, password, active, first_name, last_name, admin_access, email FROM cms_users WHERE user_id = 1
Debug: (0.156833) - (net usage: 3756600) - (peak: 4256160) SELECT group_id FROM cms_user_groups WHERE user_id = 1
Debug: (0.158677) - (net usage: 3916584) - (peak: 4361272) SELECT preference,value FROM cms_userprefs WHERE user_id = 1
Debug: (0.164093) - (net usage: 4415104) - (peak: 4853728) End of Loading Modules
Debug: (0.165056) - (net usage: 4515496) - (peak: 4962064) SELECT * FROM cms_mod_cmsjobmgr WHERE start < UNIX_TIMESTAMP() AND created < UNIX_TIMESTAMP() ORDER BY errors ASC,created ASC LIMIT 1
Debug: (0.165431) - (net usage: 4515440) - (peak: 4962064) UPDATE cms_siteprefs SET sitepref_value = 1583069356 WHERE sitepref_name = 'CmsJobManager_mapi_pref_tasks_lastcheck'
Debug: (0.166715) - (net usage: 4474160) - (peak: 4962064) SELECT sitepref_name,sitepref_value FROM cms_siteprefs
Debug: (0.169114) - (net usage: 4605712) - (peak: 5046632) start building module capability list
Debug: (0.176615) - (net usage: 5199024) - (peak: 5692328) done building module capability list
Debug: (0.177841) - (net usage: 5233424) - (peak: 5692328) INSERT INTO cms_mod_cmsjobmgr (name,created,module,errors,start,recurs,until,data) VALUES ('News\\CreateDraftAlertTask',1583069356,'News',0,1583069356,NULL,NULL,'O:23:\"CMSMS\\Async\\RegularTask\":7:{s:30:\"\0CMSMS\\Async\\RegularTask\0_task\";O:25:\"News\\CreateDraftAlertTask\":0:{}s:20:\"\0CMSMS\\Async\\Job\0_id\";N;s:22:\"\0CMSMS\\Async\\Job\0_name\";s:25:\"News\\CreateDraftAlertTask\";s:25:\"\0CMSMS\\Async\\Job\0_created\";i:1583069356;s:24:\"\0CMSMS\\Async\\Job\0_module\";s:4:\"News\";s:23:\"\0CMSMS\\Async\\Job\0_start\";i:1583069356;s:24:\"\0CMSMS\\Async\\Job\0_errors\";N;}')
Debug: (0.18019) - (net usage: 5354432) - (peak: 5923520) SELECT * FROM cms_content WHERE content_id = 1 LIMIT  1
Debug: (0.186016) - (net usage: 6092824) - (peak: 6768800) UPDATE cms_siteprefs SET sitepref_value = 1583069357 WHERE sitepref_name = 'CmsJobManager_mapi_pref_last_async_trigger'
Debug: (0.435515) - (net usage: 6028112) - (peak: 6768800) Initialize Smarty
Debug: (0.435567) - (net usage: 6028272) - (peak: 6768800) Done Initialing Smarty
Debug: (0.435785) - (net usage: 6028536) - (peak: 6768800) SELECT sitepref_name,sitepref_value FROM cms_siteprefs
Debug: (0.655135) - (net usage: 6499232) - (peak: 7074056) INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name, action, ip_addr) VALUES (1583069356,1,'patina_admin','301','ModuleManager','Cannot connect to ModuleRepository',NULL)
Debug display of 'Fetch module_file_tpl:FileManager;changelog.tpl start':(0.672651) - (net usage: 7632248) - (peak: 8407520)
Debug display of 'Fetch module_file_tpl:FileManager;changelog.tpl end':(0.689228) - (net usage: 9044336) - (peak: 10538656)
Debug display of 'Fetch module_file_tpl:MicroTiny;changelog.tpl start':(0.694035) - (net usage: 9307400) - (peak: 10538656)
Debug display of 'Fetch module_file_tpl:MicroTiny;changelog.tpl end':(0.694653) - (net usage: 9315816) - (peak: 10538656)
Debug display of 'Fetch module_file_tpl:ModuleManager;admin_installed.tpl start':(0.695274) - (net usage: 9312736) - (peak: 10538656)
Debug display of 'Start Load Smarty Plugin cms_action_url/function':(0.72001) - (net usage: 9816232) - (peak: 10538656)
Debug display of 'End Load Smarty Plugin cms_action_url/function':(0.720053) - (net usage: 9817608) - (peak: 10538656)
Debug display of 'Fetch module_file_tpl:ModuleManager;admin_installed.tpl end':(0.758703) - (net usage: 9962224) - (peak: 10554496)
Debug display of 'Fetch module_file_tpl:ModuleManager;adminprefs.tpl start':(0.758909) - (net usage: 9921016) - (peak: 10554496)
Debug display of 'Start Load Smarty Plugin cms_yesno/function':(0.762226) - (net usage: 9975200) - (peak: 10554496)
Debug display of 'End Load Smarty Plugin cms_yesno/function':(0.762269) - (net usage: 9976488) - (peak: 10554496)
Debug display of 'Fetch module_file_tpl:ModuleManager;adminprefs.tpl end':(0.764676) - (net usage: 9965216) - (peak: 10554496)
Debug: (1.0999999999983E-5) - (net usage: 9956920) - (peak: 10554496) before theme load
Debug: (2.9999999999974E-5) - (net usage: 9957208) - (peak: 10554496) after theme load
Debug: (7.0000000000014E-5) - (net usage: 9953544) - (peak: 10554496) before populate admin navigation
Debug: (0.00084800000000007) - (net usage: 10002288) - (peak: 10554496) before menu items
Debug: (0.0010870000000001) - (net usage: 10020024) - (peak: 10554496) after menu items
Debug: (0.001146) - (net usage: 10024008) - (peak: 10554496) before system modules
Debug: (0.0012220000000001) - (net usage: 10030512) - (peak: 10554496) before non system module menu items
Debug: (0.001255) - (net usage: 10032072) - (peak: 10554496) after non system module menu items
Debug: (0.0017430000000001) - (net usage: 10053760) - (peak: 10554496) after populate admin navigation
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: 2.2.9 to 2.2.13 upgrade woe

Post by paulbaker »

Still struggling with this. I found out a bit of the history of the site. It was previously discussed here:
viewtopic.php?f=8&t=80014
the upshot of which is basically "something went wrong with a previous upgrade".

I have attempted a freshen install at version 2.2.9 which appeared to go well. However the behaviour of module manager has not changed.

The lib/version.php file reads version 2.2.9 and database schema version 202. However the version number in database table _version reads 201.

I suppose one option would be installing a fresh CMSMS and copying and pasting the content over but there's about 80 pages and as many images in the Gallery module, so that sends cold chills down my back... :'(
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: 2.2.9 to 2.2.13 upgrade woe

Post by DIGI3 »

CGCU has an option for exporting and importing content, that could be a workaround. If there's no special fields or titles in Gallery then those should rebuild automatically, but you could copy the db table if you're adventurous.

Not saying the upgrade isn't salvageable, but when I've run into (what I think is) the same issue before I've ended up going to an older backup and upgrading in a couple of specific increments.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”