-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php-xml package required for PNGs to work #2013
Comments
This is one of the features that seem to be, as far as I can tell, disabled by default as of PHP 7. In other words: before PHP 7 they were always available (or at least enabled by default), while in PHP 7 the php-xml package is indeed required. For the record, I can't think of any sane reason to bundle utf8_encode() with the languages XML features (php-xml), but I guess that's just how PHP is :) Here's one thread discussing the issue: http://stackoverflow.com/questions/35701730/utf8-endecode-removed-from-php7. |
@horst-n since this is in the PWPNG class you made, I wanted to ask if this utf8_encode() is something that we need at all? I see it's creating a $this->info['palette'] property, but can't find any code that is actually using it. As a result, I'm wondering if maybe we can just delete this line to solve the problem? |
Came across this issue as well, but with PHP 5.6. Might be related to the fact that I am using a Docker image (centos6), that may have a different default configuration than other variants. For now, I just commented out line 117 of PWPNG.php to solve the problem. This is with the 3.0.57 of PW from the dev branch. |
Hey @ryancramerdesign and @horst-n, I (well, my client) ran into the same issue with this utf8_encode() and couldn't edit the affected page anymore due to the fatal error. I "deleted" the utf8_encode() call in line 117 and reloaded the corresponding "/page/edit?id=1234" in the PW backend. Then I changed the line back again because I didn't knew what I was doing there in this core module - not a good feeling Can you please fix this? My client wasn't able to edit his page anymore. Meanwhile I try to contact the sysadmin to install the module php xml. but I bet others will run into this issue aswell. here is the full error code:
PW: 3.0.138 thank you so much for your support. |
I ran into an issue where my php7 installation didn't have php-xml installed, which caused the following error if I tried to output a PNG file into my template from a file field:
Fatal error: Uncaught Error: Call to undefined function ProcessWire\utf8_encode() in /.../wire/core/PWPNG.php:117
I don't remember php-xml being noted as a required package during the PW installation.
PW 3.0.29
The text was updated successfully, but these errors were encountered: