Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,743
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,681
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,681
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,743
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: South-Western Japan
Registered: 2004-02-27
Posts: 3,656
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
phiw13 on Codeberg

Offline

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

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,743
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

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

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,656
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
phiw13 on Codeberg

Offline

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

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,743
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,681
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,743
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,681
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,743
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: South-Western Japan
Registered: 2004-02-27
Posts: 3,656
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
phiw13 on Codeberg

Offline

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

etc
Developer
Registered: 2010-11-11
Posts: 5,681
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: South-Western Japan
Registered: 2004-02-27
Posts: 3,656
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
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB