Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2021-12-15 00:22:17

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

Re: php 8.1

Interesting catch. That might be the reason, I wouldn’t know.

Anyway, it seems I will have to give testing that image format a pass ATM.

(I don’t particularly care about it actually. Given how Textpattern currently manages images an my need/use of multiple formats, it is much much easier and faster for me to just SFTP the images to the server and upload a “master” .jpg file through Textpattern. A couple of image custom fields –thanks Jakob– to hold the reference / path to the other formats, a nice little image shortcode and I am all settled).


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

Offline

#38 2021-12-15 10:27:57

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:

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).

Oleg, does your phpinfo() show any configure flag for --with-avif?

Offline

#39 2021-12-15 10:31:35

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

Re: php 8.1

gaekwad wrote #332231:

Oleg, does your phpinfo() show any configure flag for --with-avif?

Not as I see:

cscript /nologo /e:jscript configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-pdo-oci=..\..\..\..\instantclient\sdk,shared" "--with-oci8-19=..\..\..\..\instantclient\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--without-analyzer" "--with-pgo" 

But it works.

Offline

#40 2021-12-15 10:42:16

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

Re: php 8.1

etc wrote #332232:

Not as I see:

{snip}

But it works.

That doesn’t look like a full PHP compile flag list…any chance you could share your phpinfo() output, privately or publicly, please?

Offline

#41 2021-12-15 11:10:50

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

Re: php 8.1

Sure, no secrets.

Offline

#42 2021-12-15 11:41:08

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

Re: php 8.1

Baffling. I’ve never knowingly used PHP on Windows, perhaps the defaults are different for configuration. Thanks for the file, sorry I can’t shed any light on it!

Offline

#43 2021-12-16 02:55:28

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

Re: php 8.1

I am not sure what kind of magic you applied here, but but but: I could successfully upload an image in avif format using Firefox (v 96 beta5). Look

Now, it is not an absolute success though: no thumbnail was automatically generated, and manually trying to generate one (Images > edit) fails.

Of note: during the initial upload process I get 4(four!) browser pop-ups warning me: Warning "imagecreatefromavif(): AVIF image support has been disabled and some debug trace (the same as before, see upthread). These pop up messages come up both in debug and testing modes.

When trying to manually generate a thumbnail, and still on the edit images panel: an error (red) TXP message pane (“Thumbnail 3 not saved”) and two TXP debug messages (same as above).

Safari was not so successful – but that is not really surprising as it does not support the format. Description of the process, for the sake of completeness:

  • select AVIF image, the file picker shows one name txp_K08J9i! with .gif extension. Click upload
  • Browser popup: Notice "getimagesize(): – close (fully below)
  • TXP message pane: “Only .gif, .jpeg, .jpg, .png, .webp, .avif file types allowed.“

full contents of the Safari pop up:

Error reading from /private/var/tmp/txp_K08J9i!"
in /Users/username/Sites/phiw13-local/textpattern/lib/txplib_admin.php at line 482.
adminErrorHandler()
textpattern/lib/txplib_admin.php:482 getimagesize()
textpattern/lib/txplib_admin.php:571 txpimagesize()
textpattern/include/txp_image.php:827 image_data()
textpattern/include/txp_image.php:64 image_insert()
textpattern/index.php:230 include()

with smd_thumbnails, more popmessages, depending on the number of active image profiles.

Note: during the upload process, the second (and fourth) pop up gives this message:

Warning "imagecreatefromavif(): "/Users/username/Sites/_txp-dev/textpattern/tmp/txp_LoMfdK" is not a valid AVIF file"
in /Users/username/Sites/_txp-dev/textpattern/lib/txplib_admin.php at line 509.

or a try at generating a thumbnail:

Warning "imagecreatefromavif(): "/Users/username
/Sites/_txp-dev/images/5.avif" is not a valid AVIF file"

Would that in some way imply that the failure to generate the thumbnails is due to the lack of support for the format in the underlying OS? (pure speculation here, I have no clue)


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

Offline

#44 2021-12-16 09:25:15

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

Re: php 8.1

phiw13 wrote #332239:

I am not sure what kind of magic you applied here, but but but: I could successfully upload an image in avif format using Firefox (v 96 beta5). Look

No magic in the air, just protecting from (some) fatal errors. Unfortunately, the only thing you can do in your setup is upload .avif images – with wrong dimensions and no thumbnail. And this could potentially cause other problems.

As soon as we find an effective test for the real avif support, avif will be enabled only when really supported. So hurry up to upload or switch to Windows ;-)

Offline

#45 2021-12-16 09:49:51

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

Re: php 8.1

etc wrote #332242:

[…] with wrong dimensions and no thumbnail. And this could potentially cause other problems.

The one image I uploaded reports the correct dimensions (the same dimensions as her jpg twin) when placed in an article. Maybe I am lucky…

So hurry up to upload or switch to Windows ;-)

It seems Windows XP is not available anymore :-(.


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

Offline

#46 2021-12-16 10:59:55

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

Re: php 8.1

phiw13 wrote #332244:

The one image I uploaded reports the correct dimensions (the same dimensions as her jpg twin) when placed in an article. Maybe I am lucky…

Interesting. Could you save some .avif image in your images (or other) folder and test this in some article, please:

<txp:php>
dmp(imagetypes());
dmp(getimagesize('images/my_image.avif'));
</txp:php>

Offline

#47 2021-12-16 11:20:54

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

Re: php 8.1

etc wrote #332242:

As soon as we find an effective test for the real avif support, avif will be enabled only when really supported.

The next Ubuntu LTS release in April 2022 should have all the library scaffold available as packages, fingers are crossed.

So hurry up to upload or switch to Windows ;-)

/me hurriedly updates CoC to dissuade against operating system taunts…

Offline

#48 2021-12-16 11:50:02

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

Re: php 8.1

etc wrote #332245:

Interesting. Could you save some .avif image in your images (or other) folder and test this in some article, please:

<txp:php>...

will do somewhere tomorrow

gaekwad wrote #332246:

updates CoC

Call of Cthulhu ?


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

Offline

Board footer

Powered by FluxBB