[solved] Upgrade Fatal Error

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

[solved] Upgrade Fatal Error

Post by apollo9 »

My site is on cmsms version 1.11.9. When I tried to update the site or modules there was an error, or modules wouldn't upgrade.
My host used PHP version 5.2.17 and I assumed this was part of the problem.

I decided to move the site to a new host, one that offers PHP versions from 5.2 through to 5.5.
After some trial and error, I got the site working.
All modules are now up to date.

The problem: when I attempt to upgrade cmsms I am confronted with the following error:

Code: Select all

Fatal error: Cannot redeclare class Smarty in /var/sites/c/cornworthy.com/public_html/cms/lib/smarty/libs/Smarty.class.php on line 1502
I've tried upgrading to the next version, 1.11.10 and even jumping versions to 1.11.11, 1.11.12 and 1.11.13, all with the same error.

I tried disabling .htaccess in the main cms folder and changed the permission on that particular file.
The current PHP version is 5.3. If I use 5.4 the site breaks and shows Internal Server Error.
Cache is cleared before any upgrade attempt.
If I go to /install/index.php this works as normal. I have tried a fresh install without any problems.

Any ideas are appreciated because I have been struggling with this now for days.

Chris
Last edited by apollo9 on Tue Mar 10, 2015 2:59 pm, edited 1 time in total.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade Fatal Error

Post by Jo Morg »

If possible post your system info (available on the admin side of CMSMS). It's possible that a module is not compatible with PHP versions higher than 5.2 or 5.3. You shouldn't have issues with CMSMS core as it works with PHP versions up to 5.6 without problems.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

----------------------------------------------

Cms Version: 1.11.9

Installed Modules:

CMSMailer: 5.2.2
FileManager: 1.4.4
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.2
Printing: 1.1.2
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
Gallery: 2.0.1
FormBuilder: 0.8.1.1
Captcha: 0.5.2
CGExtensions: 1.45
CMSSimplepie: 1.0
CGCalendar: 1.14.3
LinkMgr: 2.0
FrontEndUsers: 1.24
SelfRegistration: 1.8.2
CustomContent: 1.10
Statistics: 1.1.3
CMSPrinting: 1.0.5
MicroTiny: 1.2.6
AjaxMadeSimple: 0.4.0
Polls: 1.1.0
CGSimpleSmarty: 1.7.4


Config Information:

php_memory_limit:
process_whole_template:
max_upload_size: 100000000
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.3.28
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 60
output_buffering: On
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 100M
upload_max_filesize: 100M
session_save_path: No check because OS path
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.6.21
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found

----------------------------------------------
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade Fatal Error

Post by Jo Morg »

Ok, as it seems you might have a few issues there:
  • - as you already have the latest versions of some CG modules you absolutely need PHP 5.4;
  • - the "Cannot redeclare class Smarty" error is a bit weird but might happen if you uploaded files via FTP and get some corrupted files during upload;
Otherwise you don't seem to have any particularly old or outdated module, but it doesn't mean one of them isn't responsible for some error.

So I would:
  1. set PHP version to 5.4;
  2. try to re-upload the whole backed up site (I assume you have a local copy) using an alternative method to FTP, for instance make a single archive of the site, upload it, and expand it there;
  3. if it still errors, try renaming the folder of the 3rd party folders, one by one, until the error disappears, in order to try to pinpoint the module responsible for the error;
Remember to clear CMSMS cache at each step, just in case...

HTH
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

Many thanks for the ideas.

So I've reverted to the original copy I made, as you suggested, by creating a zip archive on the old server, downloading, then uploading and unzipping.
I do use FileZilla to transfer the archives - is that OK?

The database was also restored to the same backup point.

Setting PHP version to 5.4 results in the site (front end) displaying:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
However, the fresh install of 1.11.13 on the same server is working OK (front end and back end) on PHP 5.4.

I had already tried renaming the module folders. This time I went further by uninstalling every module and removing all, bar those which come with cmsms.
So I guess it's not a module issue?

Upgrade path still shows the same error.

I'm going to have a look through my archive backups and try some of those.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade Fatal Error

Post by Jo Morg »

apollo9 wrote:I do use FileZilla to transfer the archives - is that OK?
It would be better if you could upload via cPanel file manager or equivalent.
apollo9 wrote:However, the fresh install of 1.11.13 on the same server is working OK (front end and back end) on PHP 5.4.
Ok so IMO that means you have something funky on a Template, a GCB, a plugin or an UDT... difficult to actually pinpoint. But I would look at all the templates and GCB's and see if there is any weird logic or odd named GCB's (these can't have spaces or other special characters except for underscores). An update with a GCB with a malformed name can break the frontend of the site.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

Okay - I downloaded and uploaded using the file manager.

Would some dodgy code cause the 500 Internal Server Error? And I don't understand why the front end works when using PHP 5.3 but this error appears when using PHP 5.4?

I checked GCBs and there were three with a dash -. They were corrected.
All UDTs were deleted.
All other tags were removed, unless their removal broke the back end.
All pages had the template set to NCleanBlue and all other templates were deleted.
Modules uninstalled and deleted.
A new test page was also created which only contained a few letters within p tags.
Still the front end was showing the 500 error, back end was fine and upgrade path still with a fatal error.

I found a backup of the site running 1.11.6 and tried that running on PHP 5.4.
The front end was broken initially (no 500 error) just some bad code on the page and I needed to clear cache.
So, front end and back end working, but still the upgrade path with the same fatal error?

Beginning to wonder if this is a problem with the host server because I was obviously able to upgrade from 1.11.6 when on the old host.
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

Here's a strange thing.

Last night, I thought, what if I try a fresh install of 1.11.12 and try to upgrade to 1.11.13!
The upgrade path works, however, on the second page, it says "Thanks for upgrading CMS Made Simple to 1.11.12 (Seymour Norte)".
The upgrade completes without any errors, but the version number stays the same - 1.11.12.
I even downloaded a fresh copy of 1.11.13, just to be sure.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade Fatal Error

Post by Jo Morg »

apollo9 wrote:Last night, I thought, what if I try a fresh install of 1.11.12 and try to upgrade to 1.11.13!
The upgrade path works, however, on the second page, it says "Thanks for upgrading CMS Made Simple to 1.11.12 (Seymour Norte)".
From 1.11.12 to 1.11.13 there is no upgrade routine as there is no difference in the DB. This is just a question of overriding some files, that's why there are (usually) diff files to these minor upgrades. However you should delete the instal folder as it is probably a leftover from a 1.10.x to a 1.11.x install. And of course: clear the cache after any update.
Just as a side note: if there are no diff files in a release then there should be and update script.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

I have discovered that the file manager on the host's server isn't overwriting existing files when a package is unzipped.

Using the diff package to go from 1.11.9 to 1.11.10 on the new installation, I found the version number wasn't changing when unzipping the package. Uploading the diff files with FileZilla fixed that problem.
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

Now that's solved one problem - the site is upgraded to 1.11.13.

The other issue of the 500 Internal Server Error when using PHP version higher than 5.3.

I have the error log attached. Not sure what it's telling me!
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1974
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade Fatal Error

Post by Jo Morg »

PHP Fatal error: Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
It seems it's a server configuration issue...
From a quick search I found this: http://stackoverflow.com/questions/1294 ... ce-warning

There is a suggestion of a possible fix.
HTH!
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
apollo9
Forum Members
Forum Members
Posts: 22
Joined: Sat Nov 09, 2013 3:10 pm

Re: Upgrade Fatal Error

Post by apollo9 »

Solved it!

The Server Error message was due to the content of the php.ini file I had copied over to the new server. Now having given the file an overhaul, the site is working normally.

Thanks so much for the help.

Chris
Locked

Return to “[locked] Installation, Setup and Upgrade”