Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2021-12-10 10:27:01

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

Re: php 8.1

phiw13 wrote #332161:

BTW – installing 4.8.8latest with PHP 8.1.0 + MySQL 8.0.* goes well (success)/

Phew! I was going to lawsuit php 8.1 for the lost hair…

phiw13 wrote #332162:

Accessing the Themes panel (vanilla install):

8192 "Return type of Textpattern\Iterator\RecFilterIterator::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice"...

… and I guess I will do

Offline

#26 2021-12-13 02:32:50

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: php 8.1

Good morning, Oleg.

etc wrote #332164:

Phew! I was going to lawsuit php 8.1 for the lost hair…

… and I guess I will do

PHP 8.1 brought to you thanks to generous donation from Big Hair Implant, Inc.
Take care!

Looks like you have fixed most errors over the WE. TY. After some more testing, I have not anymore issues at the moment.

I still have that image upload issue with AVIF files.

  1. it fails
  2. there are no Textpattern messages and
  3. a get this in the console (default, vanilla install, no plugins):
Uncaught SyntaxError: expected expression, got '<'
    jQuery 27
    txpFileupload http://txpdev.local/textpattern/textpattern.js:1908
    jQuery 2
index.php:5
    jQuery 27
    txpFileupload http://txpdev.local/textpattern/textpattern.js:1908
    jQuery 2

That syntax error only appears with AVIF files. As mentioned earlier, uploading and editing other image formats works perfectly fine, including thumbnail generation.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#27 2021-12-13 07:38:55

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

Re: php 8.1

phiw13 wrote #332187:

Uncaught SyntaxError: expected expression, got '<'...

Philippe, could you please inspect the raw server response in the browser console when you upload an avif file? Because everything works fine on my side.

Offline

#28 2021-12-13 07:47:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: php 8.1

etc wrote #332190:

Philippe, could you please inspect the raw server response in the browser console when you upload an avif file? Because everything works fine on my side.

Is this what you (don’t) want to see?

;
window.alert("Warning \"imagecreatefromavif(): AVIF image support has been disabled\n\"\nin /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php at line 509.\nadminErrorHandler()\ntextpattern/lib/txplib_admin.php:509 imagecreatefromavif()\ntextpattern/lib/txplib_admin.php:570 txpimagesize()\ntextpattern/include/txp_image.php:827 image_data()\ntextpattern/include/txp_image.php:64 image_insert()\ntextpattern/index.php:230 include()");
;
window.alert("Warning \"imagecreatefromavif(): &quot;/Users/username/Sites/_txp-dev/textpattern/tmp/txp_TkhIy3&quot; is not a valid AVIF file\"\nin /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php at line 509.\nadminErrorHandler()\ntextpattern/lib/txplib_admin.php:509 imagecreatefromavif()\ntextpattern/lib/txplib_admin.php:570 txpimagesize()\ntextpattern/include/txp_image.php:827 image_data()\ntextpattern/include/txp_image.php:64 image_insert()\ntextpattern/index.php:230 include()");
<br />
<b>Fatal error</b>:  Uncaught TypeError: imagesx(): Argument #1 ($image) must be of type GdImage, bool given in /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php:510
Stack trace:
#0 /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php(510): imagesx(false)
#1 /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php(570): txpimagesize('/Users/username/S...')
#2 /Users/username/Sites/_txp-dev/textpattern/include/txp_image.php(827): image_data('/Users/username/S...', Array, 0, true)
#3 /Users/username/Sites/_txp-dev/textpattern/include/txp_image.php(64): image_insert()
#4 /Users/username/Sites/_txp-dev/textpattern/index.php(230): include('/Users/username/S...')
#5 {main}
  thrown in <b>/Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php</b> on line <b>510</b><br />

Firefox, network tab, response subtab. Vanilla TXP, up-to-date according to Git.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#29 2021-12-13 08:56:49

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

Re: php 8.1

Hmm, looks like a libgd issue. GD library bundled with php 8.1 for windows works fine (up to a weird flip on thumbnail creation). Are you sure to have the latest php distro?

Offline

#30 2021-12-13 09:05:40

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: php 8.1

Are you sure to have the latest php distro?

According to Homebrew everything is up-to-date.

$ php -v
PHP 8.1.0 (cli) (built: Nov 28 2021 14:43:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.0, Copyright (c), by Zend Technologies

More I can’t do to get it to work locally, atm


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#31 2021-12-13 20:22:33

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: php 8.1

phiw13 wrote #332193:

According to Homebrew everything is up-to-date.

I’m curious if phpinfo() yields anything useful. Any chance you can run: php -i and post the output, please?

Offline

#32 2021-12-13 20:24:24

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

Re: php 8.1

Well, as I see, it only works on windows atm, so is of limited use. But it would be pity to postpone it to 4.9. We just need some code to check whether avif is really working, and not only announced. Then, once libgd is patched, we’d get avif support without updating txp.

Offline

#33 2021-12-13 20:33:10

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

Re: php 8.1

gaekwad wrote #332199:

I’m curious if phpinfo() yields anything useful. Any chance you can run: php -i and post the output, please?

I guess the required functions (like imagecreatefromavif()) are available, so php claims AVIF support enabled. But they need something else (codecs?) to be installed, and they are not bundled with every php distro, as I get it (may be quite wrong).

Just a teaser (the thumbnail is nice too):

Offline

#34 2021-12-13 20:44:17

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: php 8.1

etc wrote #332201:

But they need something else (codecs?) to be installed, and they are not bundled with every php distro, as I get it (may be quite wrong).

This is my gut feeling, based on this mess and continued head scratching on my part.

Offline

#35 2021-12-14 00:26:20

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,189
Website

Re: php 8.1

output of phpinfo() is here till tomorrow. I don’t see anything useful.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#36 2021-12-14 15:24:43

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,259
GitHub

Re: php 8.1

phiw13 wrote #332207:

output of phpinfo() is here till tomorrow. I don’t see anything useful.

With the ever-present risk of me getting the wrong end of the stick…there’s no --with-avif flag in the ./configure preflight…so although gd does have AVIF support, PHP is likely not fully weaponised to support it in this case.

Offline

Board footer

Powered by FluxBB