SilverStripe Error newby

Silverstripe Version: - No idea.


I have been asked to migrate a website over to a new server. After Exporting and Importing the database of the website to the new server and setting all relevant permissions, also making sure the ver of PHP is identical, I get the following error when launching the website, any idea?


[Notice] Array to string conversion
Line 162 in C:\inetpub\wwwroot\theparkhome\sapphire\core\SSViewer.php

153 // flush template manifest cache if requested
154 if (isset($_GET[‘flush’]) && $_GET[‘flush’] == ‘all’) {
155 if(Director::isDev() || Director::is_cli() || Permission::check(‘ADMIN’)) {
156 self::flush_template_cache();
157 } else {
158 return Security::permissionFailure(null, ‘Please log in as an administrator to flush the template cache.’);
159 }
160 }
162 if(substr((string) $templateList,-3) == ‘.ss’) {
163 $this->chosenTemplates[‘main’] = $templateList;
164 } else {
165 if(!is_array($templateList)) $templateList = array($templateList);
167 if(isset($_GET[‘debug_request’])) Debug::message(“Selecting templates from the following list: " . implode(”, ", $templateList));

I’m going to say that’s a very old version of Silverstripe. Out of curiosity, what version of PHP are you running it on?

Dorset Digital,

Yes, I expected so much that it was very old. I found the solution to the problem. It was running on PHP 5.4 but when I reverted it to PHP 5.3 then problem was resolved.
Yes, all very old version but I am just doing the migration. Next it will be up to the developers to bring it in to the twenty first century.

Thank you for you help and quick response.


1 Like