DOM extension issue with Freebsd 12.1 and PHP 7.4.10
| From: | Sam Durbin | Date: | Tue, 06 Oct 2020 21:24:11 +0000 |
| Subject: | DOM extension issue with Freebsd 12.1 and PHP 7.4.10 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327337@lists.php.net to get a copy of this message | ||
Hi,
I have a FreeBSD 12.1-RELEASE-p10 box running nginx and php 7.4.10
(both installed from pkg) for largely hosting wordpress sites (mariadb
on another server), and i've just struck a rather unusual error.
When trying to use a 'one click install' theme to import some
templated settings, the process didnt seem to complete properly, with
lots of imported settings missing.
nginx's error log shows:
FastCGI sent in stderr: "message: PHP Warning: DOM support is not
enabled in [PATH TO SITE HERE]WXRImporter.php on line 386PHP message:
PHP Warning: Invalid argument supplied for foreach()...
However the php dom extension is installed:
output of php -m:
[PHP Modules]
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
I've done a fair bit of googling and most of the solutions are "make
sure these packages are installed and enabled" which they appear to
be. The closest thing i can find is this
- https://github.com/awesomemotive/one-click-demo-import/issues/207 -
which notes:
This appears to be a FreeBSD specific issue.
Build php74 from the ports collection, and add the following
CONFIGURE_ARGS= flags:
--enable-dom
--enable-xmlreader
Then make sure the php74-dom and php74-xmlreader packages are not
installed. If they are installed as a prerequisite for another
package, just remove the extension ini from /usr/local/etc/php since
these extensions are now compiled in directly.
Just wondering if anyone has any thoughts? Removing php and
recompiling from ports sounds pretty drastic...
Thanks!