Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2019-12-14 19:00:39

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,297
Website

Re: Multiple problems upgrading from 4.0.3

Hi boyandin

I have a modified txp v4.4.1 (r3575) which works just fine on PHP v5.4.45 and MySQL v5.6.45-86.1. The modifications mostly regard the yield instances but also some others. Do let me know if you want a copy to help you with the upgrade and I’ll zip it and upload it for you.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#22 2019-12-14 23:22:50

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

Environment: Ubuntu 18.04.3, PHP 5.6.40/MySQL 5.7/Nginx:

@colak: thanks I would appreciate sending me that patched version.

@jakob: “Is it even necessary to do that … Could you not first try the upgrade path to an up-to-date PHP5.6+ or 7 server with a regular non-MariaDB Mysql installation? That’s a pretty common constellation.”

This is what I attempted to do first. The initial (4.0.3) site state worked fine on the above environment, after proposed upgrade path (first to 4.2.0, the to the latest) I experienced the same set of errors I already saw on MariaDB 10.* environment.

@etc: what I see after an upgrade attempt 4.0.3 to 4.2.0:

Site fails with error:
Parse error: syntax error, unexpected ‘yield’ (T_YIELD), expecting ‘(’ in ./textpattern/publish/taghandlers.php on line 274

On admin pages I see:
Warning: Unknown column ‘user_name’ in ‘where clause’ select name, val from tp_txp_prefs as txp_prefs where prefs_id=1 AND user_name=’‘ in ./textpattern/lib/txplib_db.php on line 85

Notice: Undefined variable: language in ./textpattern/index.php on line 70

Strict Standards: Non-static method theme::init() should not be called statically in ./textpattern/index.php on line 95

Strict Standards: Non-static method theme::factory() should not be called statically in ./textpattern/lib/txplib_theme.php on line 95

Strict Standards: Non-static method theme::path() should not be called statically in ./textpattern/lib/txplib_theme.php on line 50

Strict Standards: Declaration of classic_theme::announce() should be compatible with theme::announce($thing = Array) in ./textpattern/theme/classic/classic.php on line 274

Last edited by boyandin (2019-12-14 23:30:53)


Om gate gate paragate parasamgate bodhi svaha

Offline

#23 2019-12-15 06:39:53

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,297
Website

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #320542:

Environment: Ubuntu 18.04.3, PHP 5.6.40/MySQL 5.7/Nginx:

@colak: thanks I would appreciate sending me that patched version.

Here it is. Note that the images and files directories are not included and neither is the config.php file.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#24 2019-12-15 07:24:28

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

colak wrote #320545:

Here it is. Note that the images and files directories are not included and neither is the config.php file.

Downloaded, thank you!


Om gate gate paragate parasamgate bodhi svaha

Offline

#25 2019-12-15 10:43:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,792
Website

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #320542:

Site fails with error: Parse error: syntax error, unexpected ‘yield’ (T_YIELD)

All your upgrade problems are likely to stem from this. The upgrade scripts can’t get past this to run the rest of the upgrade and eradicate all the other errors you’re seeing.

If you’re trying to upgrade to 4.2.0 on a version of PHP > 5.5 you will run into problems. Your options are:

  • Use a lower version of PHP to get to 4.2.0 and then increase that version to upgrade the rest of the way. You might even have to jump to 4.6 on the older version of PHP and then upgrade PHP to make the final leap to 4.7.3. It’s not something I’ve tried on high PHP 5.x systems.
  • Comment out (or remove) the Textpattern ‘yield’ function in ‘taghandlers.php’ and upgrade to 4.2.0.
  • Patch the ‘taghandlers.php’ file so that references to yield use tpt_yield instead. Use the current taghandlers for reference and make the changes to the registration call and the function itself.

Any of those should get you over this hurdle.

After that, if your version of PHP is still 5.6.x, you’ll continue to see the Strict Standards warnings, but you can ignore those. They’ll just be around until you move to a later Txp where we squashed those annoyances.

After first login under Textpattern 4.2.0 you will see the “Warning: Unknown column ‘user_name’ in ‘where clause’” error but navigating to another page on the admin side will clear it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2019-12-15 10:49:17

boyandin
Member
Registered: 2005-09-16
Posts: 21

Re: Multiple problems upgrading from 4.0.3

Bloke wrote #320550:

All your upgrade problems are likely to stem from this. The upgrade scripts can’t get past this to run the rest of the upgrade and eradicate all the other errors you’re seeing. …

Thanks for detailed pieces of advice! I’ll switch to OS where I can compile older PHP versions without much ado, and resume.


Om gate gate paragate parasamgate bodhi svaha

Offline

#27 2019-12-15 18:28:58

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,297
Website

Re: Multiple problems upgrading from 4.0.3

The zip I have posted deals with all yield issues. I would try it, but back-up first.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB