Hi, I moved my CMSMS version 2.1.6 site to a different server using the backup/restore options in cPanel, including the database. I didn't know there was a guide at the time, but I also moved a WordPress installation using the same process, and that site works, so I believe my method is sound
I imported the database and recreated the user (with permissions) on the new server, edited the config.php file to reflect a slight change in db_name, but the site is only getting a generic HTTP Error 500 message.
I've double-checked my config settings and they are correct; it's a very basic setup with only these lines:
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = '**********';
$config['db_password'] = '**********';
$config['db_name'] = '**********';
$config['db_prefix'] = '**********';
$config['timezone'] = 'America/St_Johns';
$config['public_cache_location'].'/';
I have tried '/tmp/cache' on the last line but there was no difference.
I checked the error log in the root of the installation folder and this line is present whenever I refresh the site:
PHP Warning: Undefined array key "public_cache_location" in /home/*************/config.php on line 12
Can anyone help resolve this?
Thanks.
Undefined array key "public_cache_location"
Re: Undefined array key "public_cache_location"
What happens if you comment out the public cache location line in config?
Not getting the answer you need? CMSMS support options
Re: Undefined array key "public_cache_location"
With the line commented out, it still loads to Error 500, and in the error log the line referencing it is gone.
These 3 lines are logged there still with each refresh: (They have been there this whole time in addition to the public_cache_location line)
These 3 lines are logged there still with each refresh: (They have been there this whole time in addition to the public_cache_location line)
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /*****/lib/classes/class.moduleoperations.inc.php on line 377
PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /******/lib/classes/class.moduleoperations.inc.php on line 384
PHP Fatal error: Type of SmartyCompilerException::$line must be int (as in class Exception) in /******/lib/smarty/Smarty.class.php on line 1530
Re: Undefined array key "public_cache_location"
I upgraded to the latest version of CMSMS; the installer detected the old installation and upgraded without an issues, now everything is working fine.
Thanks for your assistance.
Thanks for your assistance.
Last edited by jason689 on Wed Jun 11, 2025 3:59 pm, edited 1 time in total.