Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2019-12-14 16:04:55

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

Re: Multiple problems upgrading from 4.0.3

So far, no luck.

Main problem is to create a VM with OS old enough to support PHP 5.3 components (I will have to build them). Wasted several hours on Ubuntu 18.04, after I understood I will have to manually build all the PHP 5.3 dependency libraries (such as old OpenSSL etc).

Is it possible to import posts/content from old TextPattern installation to a new one?

I have wasted much time on this migration already, and still stuck at exactly the same place.


Om gate gate paragate parasamgate bodhi svaha

Offline

#17 2019-12-14 16:29:19

etc
Developer
Registered: 2010-11-11
Posts: 5,681
Website GitHub

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #320527:

So far, no luck.

Main problem is to create a VM with OS old enough to support PHP 5.3 components

It looks more like a MariaDB problem. Have you tried this?

Offline

#18 2019-12-14 16:31:37

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

Re: Multiple problems upgrading from 4.0.3

etc wrote #320528:

It looks more like a MariaDB problem. Have you tried this?

In fact, it’s currently PHP 5.3 building problem – I copied the installation to MySQL 5.7-powered environment. It has imported from MariaDB without glitches.


Om gate gate paragate parasamgate bodhi svaha

Offline

#19 2019-12-14 17:07:17

etc
Developer
Registered: 2010-11-11
Posts: 5,681
Website GitHub

Re: Multiple problems upgrading from 4.0.3

And what errors you get under your current PHP version? It could be just a matter of commenting out few badly-named txp functions like yield().

Offline

#20 2019-12-14 18:00:46

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,205
Website GitHub

Re: Multiple problems upgrading from 4.0.3

boyandin wrote #320527:

So far, no luck.

Main problem is to create a VM with OS old enough to support PHP 5.3 components (I will have to build them). Wasted several hours on Ubuntu 18.04, after I understood I will have to manually build all the PHP 5.3 dependency libraries (such as old OpenSSL etc).

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.

Is it possible to import posts/content from old TextPattern installation to a new one?

You can bring in the respective tables from an earlier database. They will still need updating in part at least, though, as there have been some minor changes. The posts are stored in the `textpattern` table, the images in `txp_image`, the pages and forms in `txp_page` and `txp_form` etc., the sections in `txp_section` and the users in `txp_users`.

If you did set up a clean installation as a test case in your new environment first, you could import the textpattern table entries as sql first (just the entries, not the table creation) and then see if they display correctly first of all. I can’t remember off hand exactly what has changed to the Textpattern table over the years, but that is in the code of the update folder. You may find, for example, that you need to correct your `expires` entries.


TXP Builders – finely-crafted code, design and txp

Offline

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

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,388
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
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: 9,388
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
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: 12,475
Website GitHub

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.

Hire Txp Builders – finely-crafted code, design and Txp

Online

#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: 9,388
Website GitHub Mastodon Twitter

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 | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB