Page 1 of 1

Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 1:41 pm
by paulbaker
What might this be?
Warning: preg_match(): Compilation failed: unrecognized character after (?< at offset 4 in /web1/user34855/website/lib/smarty/Smarty.class.php on line 1217

Fatal error: Uncaught --> Smarty: Unable to load template 'file:cmsms-error-console.tpl' <-- thrown in /web1/user34855/website/lib/smarty/sysplugins/smarty_internal_template.php on line 185
Showing on the front end of an upgraded site with debug = true.

Background: This is a new client but an old site of theirs. Was running 1.9.2 with some errors, it was a mess. I copied over to my (good) hosting and upgraded successfully - it is working fine on my server at version 2.2.3.1.

Copying it back to their (not good) hosting, I get the above errors.

I have temporarily put phpinfo for their hosting here, they are running PHP 5.5.17:
'http://bit.ly/2vLLZP6

What I have already tried:
Turned on debug.
Re-uploaded Smarty.class.php in case there was an FTP error on upload (no alternative to FTP on their hosting, sadly).
Cleared cache on CMSMS by deleting files in tmp.
Cleared browser cache.
Searched forum.
Drank coffee.
:'(

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 3:07 pm
by calguy1000
I have not seen this issue before.

This smells to me like a PHP issue... or at least a smarty issue.
But chasing through the changelogs of both PHP and smarty did not point out anything glaringly obvious.

So I would double check your config.php, clear the cache once again and see if the problem magically goes away.

If it does not, then it means more digging. Maybe try to upgrade PHP versions on that host... and if that does not work then we would have to get creative.

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 3:17 pm
by scooper
Did you try re-uploading the cmsms-error-console.tpl file as well as Smarty? (It lives in lib/assets/templates )

Can you run the installer on this host to refresh the files? If not then I suspect it's time to persuade your client to switch hosts....

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 5:11 pm
by paulbaker
Thank you both for your suggestions.

I deleted cmsms-error-console.tpl file completely - no change in error message.

Then I re-uploaded cmsms-error-console.tpl file - again no change.

Then I uploaded cmsms-2.2.3.1-install.php and ran it to do a refresh. I see:
Fatal error: Uncaught exception 'PharException' with message 'phar "/web1/user34855/website/cmsms-2.2.3.1-install.php" SHA1 signature could not be verified: broken signature' in /web1/user34855/website/cmsms-2.2.3.1-install.php:8 Stack trace: #0 /web1/user34855/website/cmsms-2.2.3.1-install.php(8): Phar::webPhar(NULL, 'index.php') #1 {main} thrown in /web1/user34855/website/cmsms-2.2.3.1-install.php on line 8
Does that help diagnose what is wrong?

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 5:14 pm
by calguy1000
The phar error means you uploaded the installation assistant in ASCII mode instead of binary mode.

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Wed Sep 06, 2017 6:40 pm
by paulbaker
Oooops. ;D Thank you.

I have now uploaded in binary. The freshen process is working but without CSS and images. Odd.

In step 3 Tests I see:
Status Test
Check for ziparchive function
Check for multibyte support
Multibyte support is not enabled in your configuration
Ensuring that output buffering is enabled
Checking disabled functions
Note: one or more PHP core functions are disabled. This can have negative impact on your CMSMS installation, particularly with third party extensions. Please keep an eye on your error log. Your disabled functions are:

chmod
Test if we can make outgoing HTTP connections
We encountered problems connecting to a remote URL. This will limit some of the functionality of CMS Made Simple
See also screenshot.
Freshen process step 3
Freshen process step 3

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Fri Sep 08, 2017 6:16 pm
by paulbaker
"Check for multibyte support" is the only failure. The rest are warnings.

Any ideas on what I can try to progress this?

Thanks

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Mon Sep 11, 2017 9:50 am
by scooper
You should definitely ask your host to enable the mbstring extension anyway, but if your css / js files aren't being loaded then I think that points to a different issue.

Can you check your htaccess file for any odd rewrite rules? Or just remove it completely to see if you can load the site and then we can narrow it down.

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Mon Sep 11, 2017 5:17 pm
by paulbaker
Thanks scooper. I have asked for multibyte support (mbstring extension) but I suspect the answer will be no. In which case it looks like CMSMS is out of the question. That's fine I will just move the site.

You were absolutely right, there was a .htaccess file lurking in the root. :P However, even after removing it I still get the same install/refresh pages without css/js. And the front end site itself is the same. (After clearing browser cache too). There is no url_rewriting in the config.php file.

Re: Can't load cmsms-error-console.tpl after upgrade

Posted: Tue Sep 19, 2017 5:28 pm
by paulbaker
Just to finish this one off:

Host enabled mbstring (eventually). Installation still runs with no CSS/JS. It gets past the mbstring check. But it fails with a memory error:

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 32769 bytes) in phar:///web1/user34855/website/cmsms-2.2.3.1-install.php/app/class.cms_install.php on line 318

Life itself isn't long enough to deal with hosting problems like this. I have told the client he has to move his site.

Lesson learnt: avoid Easily hosting, at all costs. (It was client's choice not mine).

Thanks again for assistance.