Undefined array key "public_cache_location"

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
jason689
New Member
New Member
Posts: 2
Joined: Fri May 30, 2025 1:56 am

Undefined array key "public_cache_location"

Post by jason689 »

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.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1785
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Undefined array key "public_cache_location"

Post by DIGI3 »

What happens if you comment out the public cache location line in config?
Not getting the answer you need? CMSMS support options
jason689
New Member
New Member
Posts: 2
Joined: Fri May 30, 2025 1:56 am

Re: Undefined array key "public_cache_location"

Post by jason689 »

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)
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
jason689
New Member
New Member
Posts: 2
Joined: Fri May 30, 2025 1:56 am

Re: Undefined array key "public_cache_location"

Post by jason689 »

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.
Last edited by jason689 on Wed Jun 11, 2025 3:59 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”