Textpattern CMS support forum

You are not logged in. Register | Login | Help

#101 2019-10-01 09:50:33

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,574

Re: Textpattern CMS demo site

I’m pleased to report dev-demo is now running PHP 7.4 RC3.

Offline

#102 2019-10-01 10:41:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,760
Website

Re: Textpattern CMS demo site

Love running dev on the latest bleeding edge code, thank you. Really helpful to catch issues early that are coming down the pipeline from the PHP team and would bite us.


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

#103 2019-10-05 12:10:21

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,574

Re: Textpattern CMS demo site

SQL nerds, I have some great news for you.

Each demo site rebuilds every three hours, and a .sql script creates ~6000 users for each site. Until today, this was the syntax used:

INSERT INTO `txp_users` (`user_id`, `name`, `pass`, `RealName`, `email`, `privs`, `last_access`, `nonce`)
VALUES
(1,'managing-editor1',PASSWORD('managing-editor1'),'Managing Editor #1','managing-editor1@example.com',2,NULL,''),
(2,'managing-editor2',PASSWORD('managing-editor2'),'Managing Editor #2','managing-editor2@example.com',2,NULL,''),
(3,'managing-editor3',PASSWORD('managing-editor3'),'Managing Editor #3','managing-editor3@example.com',2,NULL,''),
(4,'managing-editor4',PASSWORD('managing-editor4'),'Managing Editor #4','managing-editor4@example.com',2,NULL,''),
(5,'managing-editor5',PASSWORD('managing-editor5'),'Managing Editor #5','managing-editor5@example.com',2,NULL,''),
[…]

This works fine in MySQL 5, which is what the demo sites run on, but it does not work in MySQL 8, which is the current version. Oleg (known around here as etc) provided an alternative syntax, so now the syntax looks like this:

INSERT INTO `txp_users` (`user_id`, `name`, `pass`, `RealName`, `email`, `privs`, `last_access`, `nonce`)
VALUES
(1,'managing-editor1',CONCAT('*', SHA1(UNHEX(SHA1('managing-editor1')))),'Managing Editor #1','managing-editor1@example.com',2,NULL,''),
(2,'managing-editor2',CONCAT('*', SHA1(UNHEX(SHA1('managing-editor2')))),'Managing Editor #2','managing-editor2@example.com',2,NULL,''),
(3,'managing-editor3',CONCAT('*', SHA1(UNHEX(SHA1('managing-editor3')))),'Managing Editor #3','managing-editor3@example.com',2,NULL,''),
(4,'managing-editor4',CONCAT('*', SHA1(UNHEX(SHA1('managing-editor4')))),'Managing Editor #4','managing-editor4@example.com',2,NULL,''),
(5,'managing-editor5',CONCAT('*', SHA1(UNHEX(SHA1('managing-editor5')))),'Managing Editor #5','managing-editor5@example.com',2,NULL,''),
[…]

This also works fine in MySQL 5.7 (possibly earlier too, but I haven’t checked), and should also work in MySQL 8.0

As of now, the CONCAT() route is what we’re using. There should be no change in availability, but things are a bit faster and we’re getting ready for a jump to MySQL 8.0, perhaps running a dual-version’d MySQL on the demo server.

As always, please report any problems here and I will investigate.

Thanks for the tip, etc!

PS: for the speed heads…the legacy PASSWORD() route takes ~750ms to splat the table and insert ~6,000 users and the CONCAT() route takes ~720ms to do the same thing. As I understand it, it will be even faster with MySQL 8.0.

Offline

#104 2019-10-05 13:24:34

etc
Developer
Registered: 2010-11-11
Posts: 3,296
Website

Re: Textpattern CMS demo site

Seems to work fine on 5.7, waiting for 8.0 switch.

Offline

#105 2019-10-06 16:06:14

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,574

Re: Textpattern CMS demo site

etc wrote #319535:

Seems to work fine on 5.7, waiting for 8.0 switch.

I’m hoping to do some tests with a server build in the next week, if the tests are successful then we’ll have Persona (MySQL) 8.0 to play with.

Offline

#106 2019-10-06 18:14:20

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,320
Website

Re: Textpattern CMS demo site

Just a heads up. When trying to login the dev demo, the site repeatedly returned

Your session has expired. Please log in again.

I tested this by using a number of login/passwords generated in the demo’s page.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#107 2019-10-06 19:20:47

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,574

Re: Textpattern CMS demo site

colak wrote #319550:

Your session has expired. Please log in again.

Thanks for the report, Yiannis. It works fine here, so may be a localised issue. This is usually due to a stale or mangled cookie – can you try clearing the cookie and trying again, please?

Offline

#108 2019-10-07 05:36:40

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,320
Website

Re: Textpattern CMS demo site

I cleared all cookies in FF, my default browser but the error maintained. I could nevertheless login just fine in Safari.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#109 2019-10-07 08:01:21

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,574

Re: Textpattern CMS demo site

colak wrote #319558:

I cleared all cookies in FF, my default browser but the error maintained.

How strange. Are you using an exotic flavour of Firefox?

Offline

#110 2019-10-07 09:28:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,320
Website

Re: Textpattern CMS demo site

The latest stable release on mac. 69.0.2 (64-bit)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

Board footer

Powered by FluxBB