-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Error installing PHP when --with-pear
is used
#14834
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
Comments
I can reproduce when building PHP 8.3.9 using libxml2 2.13.2 and libxslt 1.1.42. The problem does not occur with the same PHP sources and using libxml2 2.12.7 and libxslt 1.1.39. I will see, whether I can triage further. |
I can reproduce this and is probably related to the libxml2 update. |
For the record, libxml2 version on my system is 2.13.2 |
I tested it on libxml2 2.12 and it works, while 2.13 breaks. I'm starting to bisect libxml2 now. |
Bisected to GNOME/libxml2@4f14fe9 |
I figured it out. <?php
$parser = xml_parser_create();
xml_set_character_data_handler($parser, function($_, $data) {
var_dump($data);
});
xml_parse($parser, file_get_contents('test.xml'), true);
?> with the following XML document: <?xml version="1.0" encoding="UTF-8"?>
<root>
<element hint="hello'world"/>
</root> Now produces an extra |
libxml2 2.13 makes changes to how the parsing state is set, update our code accordingly. In particular, it started reporting entities within attributes, while it should only report entities inside text nodes.
I opened a PR and the fix should be a part of the next 8.2 and 8.3 releases. |
* PHP-8.2: Fix GH-14834: Error installing PHP when --with-pear is used
* PHP-8.3: Fix GH-14834: Error installing PHP when --with-pear is used
@nielsdos Thank you for the quick fix! |
Sounds like a fix is on the way, but I was still seeing it when installing 8.2.x/8.3.x with asdf/homebrew today. Downgrading libxml2 solved this issue for me, but it was a bit tricky so I created a gist of the steps for anyone else who is running into it: https://gist.github.com/will3216/7d72f29bc5b2c6e5c3f3ef373ae0a365 |
@will3216 This was fixed in 8.2.22/8.3.10 released on August 1st, so the fix is already released |
I tried both of those versions with https://github.com/asdf-community/asdf-php/blob/master/bin/install The downgrade suggested here solved it for me, so just wanted to share how to do it in case anyone else ended up here for the same reason |
php/php-src#14834 Error installing PHP when --with-pear is used macports#14834 php/php-src@67259e4 Fix macportsGH-14834: Error installing PHP when --with-pear is used Changes to be committed: modified: lang/php/Portfile new file: lang/php/files/ext-xml-tests-gh14834.phpt new file: lang/php/files/patch-php74-ext-xml-compat.c.diff new file: lang/php/files/patch-php80-ext-xml-compat.c.diff
Description
The following code:
Resulted in this output:
Based on this comment from 3 days ago I'm not alone https://aur.archlinux.org/packages/php83-mysql#comment-980592
PHP Version
PHP 8.3.9
Operating System
Chimera linux
The text was updated successfully, but these errors were encountered: