recreating/recovering/upgrading old cms site

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
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

recreating/recovering/upgrading old cms site

Post by voytek »

helo,

I have an old cms site on an old centos server, I'm trying to recreate/upgrade/recover on an up to date host
the hosting hardware failed. I have html and mysql

when I transferred the public_html to a new offline host, I get:

This page isn’t working
192.168.1.8 is currently unable to handle this request.
HTTP ERROR 500

in http error I see:
[Mon Mar 11 14:08:28.861672 2024] [php7:error] [pid 8127] [client 192.168.1.182:50779] PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/html/cms/include.php on line 73

that's line 73:
#Make a new CMS object
require(cms_join_path($dirname,'lib','classes','class.global.inc.php'));
$gCms =& new CmsObject();
if (isset($starttime))
{
$gCms->variables['starttime'] = $starttime;
}


I then attempted to upgrade the site, get this:

http://192.168.1.8/cms/cmsms-2.2.19-install.php/

Step 2 - Detect existing software
Installation Directory:
/var/www/html/cms
Although an installation of CMS Made Simple was found, it is not possible to upgrade this version using this application. The version may be too old.
Your current working directory: /VAR/WWW/HTML/CMS
Your version: 1.6.6 (BONDE)
Database Schema version: 32
Approximate installation date: 11/25/2010
Version information
...

what's my best way forward ? it's a fairly simple site, from what I recall
sql: 72 tables Sum 2,331 InnoDB utf8mb4_unicode_ci 431 KiB

# php --version
PHP Warning: Module 'xml' already loaded in Unknown on line 0
PHP 7.3.33 (cli) (built: Aug 1 2023 13:16:28) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.33, Copyright (c) 1998-2018 Zend Technologies

Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 mod_wsgi/3.4 Python/2.7.5 PHP/7.3.33 configured

thanks for any pointers, help, advice
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: recreating/recovering/upgrading old cms site

Post by DIGI3 »

For the 1.x series you need to upgrade incrementally to 1.12.2 before you install any 2.x. version Here's the instructions: https://docs.cmsmadesimple.org/upgrading/old-versions

You may also need to switch PHP versions a couple of times during the upgrade, it can be a challenge depending on how many outdated modules, extensions, etc there are. Check the release date of the version you're currently on (e.g. 1.6.6 is from 2009, so you may need to be on PHP 5.x for that to work, and install module versions that were also released around the same time.
Not getting the answer you need? CMSMS support options
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

I've installed Centos 7, copied files, got the site up, except for plugin on banner

how to I edit or create admin user in SQL database, which file, haven't found anything yet ? so I can login to back end ?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: recreating/recovering/upgrading old cms site

Post by DIGI3 »

The users should be in cms_users, the easiest option is to change the associated email address in the database, then use the 'forgot password' functionality on the admin screen. This relies on the email configuration the site had still being valid, but if it's relatively generic (e.g. not using an unavailable smtp address to send) then it should work.

Failing that, there's a tutorial here: https://cmscanbesimple.org/blog/cms-mad ... d-recovery
I'm not sure how well it will work on a version that old as the encryption methods and salting have changed over the years. There are some older forum posts that offer other methods if you want to dig through them - just make sure they're from a similar timeframe (1.6.6 was released in 2009).
Not getting the answer you need? CMSMS support options
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

thanks!
hmmm, didn't see any cms_users in phpmyadmin ??, though, it's clearly there, I guess I need to learn sql better
yep, the email recovery worked, thanks, got in

I think I can get most of it working ok on Centos 7 for the time being;
I'll check the upgrade path you've suggested

show tables
...
| cms_user_groups |
| cms_userplugins |
| cms_userplugins_seq |
| cms_userprefs |
| cms_users |
| cms_users_seq |
| cms_version |
+-----------------------------------+
72 rows in set (0.001 sec)
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

DIGI3 wrote: Mon Mar 11, 2024 2:32 pm You may also need to switch PHP versions a couple of times during the upgrade, it can be a challenge depending on how many outdated modules, extensions, etc there are. Check the release date of the version you're currently on (e.g. 1.6.6 is from 2009, so you may need to be on PHP 5.x for that to work, and install module versions that were also released around the same time.
yes, it is 1.6.6!
and, it's some sort of 'custom' ? Sites'n'Stores build, anyhow, got into admin back end now
thanks again for assistance!

----------------------------------------------
Cms Version: 1.6.6

Installed Modules:

CMSMailer: 1.73.14
FileManager: 1.0.1
MenuManager: 1.6.2
ModuleManager: 1.3.1
News: 2.10.3
nuSOAP: 1.0.1
Printing: 1.0.4
Search: 1.6.1
ThemeManager: 1.1.1
TinyMCE: 2.5.5
FormBuilder: 0.6.4

Config Information:

php_memory_limit:
process_whole_template: false
max_upload_size: 32000000
default_upload_permission: 664
assume_mod_rewrite: false
page_extension:
internal_pretty_urls: false
use_hierarchy: true

Php Information:

phpversion: 5.4.16
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
memory_limit: 128M
max_execution_time: 30
safe_mode: Off (False)
session_save_path: /var/lib/php/session (0770)
session.use_cookies: On (True)

Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 10.3.35
----------------------------------------------
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

DIGI3 wrote: Mon Mar 11, 2024 2:32 pm For the 1.x series you need to upgrade incrementally to 1.12.2 before you install any 2.x. version Here's the instructions: https://docs.cmsmadesimple.org/upgrading/old-versions
so, do I simply download next build, in my case of 1.6.6, i get cmsmadesimple-1.6.7-full.tar.gz ?

and, unarchive over my existing dir tree ?
and, get modules version from around date of release of 1.6.7 ?

and, rinse and repeat ?

this is on Centos 7 Apache 2.4
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

ahhh, /install/upgrade.php .... NOT just install... it pays to RTFM...

made small progress!

----------------------------------------------
Cms Version: 1.6.7

Installed Modules:

CMSMailer: 1.73.14
FileManager: 1.0.2
MenuManager: 1.6.2
ModuleManager: 1.3.2
News: 2.10.4
nuSOAP: 1.0.1
Printing: 1.0.4
Search: 1.6.1
ThemeManager: 1.1.1
TinyMCE: 2.6.2
FormBuilder: 0.6.4

Config Information:

php_memory_limit:
process_whole_template: false
max_upload_size: 2000000
default_upload_permission: 664
assume_mod_rewrite: false
page_extension:
internal_pretty_urls: false
use_hierarchy: true

Php Information:

phpversion: 5.4.16
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
memory_limit: 128M
max_execution_time: 30
safe_mode: Off (False)
session_save_path: /var/lib/php/session (0770)
session_use_cookies: On (True)

Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 10.3.35
----------------------------------------------
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: recreating/recovering/upgrading old cms site

Post by DIGI3 »

Sounds like you're on the right track. I generally back up the files and db after each version jump (e.g. at 1.6.7, 1.7.1, 1.8.2, etc) as something is bound to go wrong and it would suck to start over at the beginning.

Another handy tip is if things fail after an upgrade, it's likely a third-party module. You can rename that module's folder temporarily while you get it updated. The module manager won't work until you get to 1.11ish I think as we changed the server around then, so you'll need to download any modules and install manually.
Not getting the answer you need? CMSMS support options
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

thanks for all the help, made some progress, no issues observed going through

1.6.7 > 1.7 > 1.8.2 > cmsmadesimple-1.9.4.3-full.tar.gz

just now upgraded to 1.10.3

it seems OK, though, get this in the log

admin ERROR ERROR DETECTED: Call to a member function GetDb() on a non-object at .../public_html/modules/TinyMCE/stylesheet.php:38 04/08/24 09:47:06
admin ERROR ERROR DETECTED: Call to a member function GetDb() on a non-object at ...u/public_html/modules/TinyMCE/stylesheet.php:38 04/08/24 09:45:09


also, see this: Active/False

Extensions/modules:

nuSOAP 1.0.2 Installed False Uninstall Help About

the links I found go nowhere ? should I disable ? leave as is ?

thanks!

V
----------------------------------------------

Cms Version: 1.10.3

Installed Modules:

CMSMailer: 2.0.2
FileManager: 1.2.0
MenuManager: 1.7.7
ModuleManager: 1.5.3
News: 2.12.3
Printing: 1.1.2
Search: 1.7
ThemeManager: 1.1.4
TinyMCE: 2.8.4
FormBuilder: 0.6.4
CMSPrinting: 1.0
MicroTiny: 1.1.1

Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 2000000
default_upload_permission: 664
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:

phpversion: 5.4.16
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 0
memory_limit: 400M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 12M
upload_max_filesize: 15M
session_save_path: /var/lib/php/session (0770)
session_use_cookies: On (True)
xml_function: On (True)

Server Information:

Server Api: apache2handler
Server Db Type: MySQL (mysql)
Server Db Version: 10.3.35

----------------------------------------------
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: recreating/recovering/upgrading old cms site

Post by DIGI3 »

Probably fine, but if it gives you trouble you could always remove TinyMCE - it's not part of the core after (I think) 2.0 (?), when we switched to microtiny.
Not getting the answer you need? CMSMS support options
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

thanks!

I just tried going to cmsmadesimple-1.11.13-full.tar.gz but struck a problem, getting this:

Oops!
Sorry, it looks like something went wrong and an error has occurred.
Don’t worry, it can happen to any of us.

ERROR: at line 46 in file /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:

Syntax error in template "tpl_body:22" on line 46 "
{menu template='simple_navigation.tpl' number_of_levels="1"}
" - Unexpected "&"

#0 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templateparser.php(3135): Smarty_Internal_TemplateCompilerBase->trigger_template_error()
#1 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templateparser.php(3199): Smarty_Internal_Templateparser->yy_syntax_error(43, '&')
#2 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php(111): Smarty_Internal_Templateparser->doParse(43, '&')
#3 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php(273): Smarty_Internal_SmartyTemplateCompiler->doCompile('??</__body>?<div i...')
#4 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_template.php(186): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#5 /.../public_html/lib/smarty/libs/sysplugins/smarty_internal_templatebase.php(149): Smarty_Internal_Template->compileTemplateSource()
#6 /.../public_html/lib/classes/class.Smarty_CMS.php(337): Smarty_Internal_TemplateBase->fetch('tpl_body:22', 'p15', NULL, NULL, false, false, false)
#7 /srv/.../public_html/index.php(243): Smarty_CMS->fetch('tpl_body:22')
#8 {main}
voytek
Forum Members
Forum Members
Posts: 10
Joined: Tue Jan 02, 2018 1:50 pm

Re: recreating/recovering/upgrading old cms site

Post by voytek »

also, it suggests to:

"(Optional) Change Admin theme to OneEleven to get the latest functionality", where is that/where to do that ?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: recreating/recovering/upgrading old cms site

Post by DIGI3 »

For the menumanager thing it might be a php version, I'm not sure. Once you get to 2.x you'll want to switch your menus to Navigator anyway. To change the admin theme you do it in My Preferences > My Account (nav might be slightly different in 1.x, I can't remember that far back).
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”