Closed welblaud closed 5 years ago
Seems like your're missing the xmlwriter extension. It's often included by default when you install PHP, but clearly not in your case. Try installing php-xml (https://askubuntu.com/a/1044660)
@danmichaelo, that was my very first attempt to make it to work.
I have php7.2-xml installed.
php -i | grep "xml"
returns:
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
libxml
From the askubuntu thread, I am not sure what it should return in the case php-xml is ready. Or should I enable it or so?
Hm, seems like xmlwriter is a separate extension, but it got installed by default for me. Here's what I got (on Red Hat):
php -i | grep -i "xml"
/etc/opt/rh/rh-php72/php.d/20-simplexml.ini,
/etc/opt/rh/rh-php72/php.d/20-xml.ini,
/etc/opt/rh/rh-php72/php.d/20-xmlwriter.ini,
/etc/opt/rh/rh-php72/php.d/30-xmlreader.ini
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.1
libxml
libXML support => active
libXML Compiled Version => 2.9.1
libXML Loaded Version => 20901
libXML streams => enabled
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
SimpleXML
Simplexml support => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.1
xmlreader
XMLReader => enabled
xmlwriter
XMLWriter => enabled
libxslt compiled against libxml Version => 2.9.1
The XMLWriter => enabled
line shows that the xmlwriter extension is enabled.
Perhaps there's a php7.2-xmlwriter package?
I omitted the -i
argument for grep:
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
libxml
libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled
Yeah, I did that at first too. But indeed seems like you're missing some php extensions. Try installing php7.2-xmlwriter
. You might also need php7.2-dom
and php7.2-simplexml
, not sure.
In Ubuntu, it seems apt has php7.2-xmlwriter
and php7.2-xml
associated to php7.2-xml
.
In the PHP Manual, there is:
The XMLWriter extension was initially a PECL extension for PHP 5. It was later added to the PHP source (bundled) as of PHP 5.1.2. This extension is enabled by default.
This could be the problem why I don't see any configs, modules or extensions. I guess it should work without any additional configuration.
Strange.
Hm, yeah, it should be enabled by default. How did you install php?
@danmichaelo, really simply, via apt
:)
In that case it should be enough with
apt install php php-xml
On a fresh Ubuntu 19 virtual machine I then get the following,
$ php -i | grep -i xml
/etc/php/7.2/cli/conf.d/15-xml.ini,
/etc/php/7.2/cli/conf.d/20-simplexml.ini,
/etc/php/7.2/cli/conf.d/20-xmlreader.ini,
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.4
libxml
libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled
SimpleXML
Simplexml support => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.4
xmlreader
XMLReader => enabled
xmlwriter
XMLWriter => enabled
libxslt compiled against libxml Version => 2.9.4
If you do not get XMLWriter => enabled
at this point, the must be something odd with your setup.
It somehow helped to reinstall the whole php, (php-common
, php-cli
, php-xml
).
Now it logs:
/etc/php/7.2/cli/conf.d/15-xml.ini,
/etc/php/7.2/cli/conf.d/20-simplexml.ini,
/etc/php/7.2/cli/conf.d/20-xmlreader.ini,
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.4
libxml
libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled
SimpleXML
Simplexml support => enabled
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.4
xmlreader
XMLReader => enabled
xmlwriter
XMLWriter => enabled
libxslt compiled against libxml Version => 2.9.4
Closing the issue.
I have just installed php-marc via composer but when I try to use it, it logs:
The installation process went well, I tried to regenerate autoloading but nothing helped.
The example I am trying to use:
PHP 7.2.19 Composer 1.9.0 Ubuntu 19.04