• Resolved Doidel

    (@doidel)


    When I first installed your plugin it told me that curl and dom are missing
    “The following PHP extensions are missing: curl, dom. Please contact your host to finish installation.”
    So I installed them. But now the error still shows.

    php -m clearly shows that curl and dom are up and running.
    I run php 7.4.9 on nginx on Ubuntu.
    I even rebooted my server completely, you know, just to try. Still the error persists.

    Also, I found no errors in the logs:
    – /var/log/php7.3-fpm.log
    – /var/log/nginx/error.log

    I’d be grateful for some help. What could be the reason for this?
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    On many hosting platforms, curl or other extensions are installed, but some of the extension’s functions have been disabled (e.g. for security reasons).

    The AMP plugin requires the following curl functions to exist and be available:

    curl_close, curl_errno, curl_error, curl_exec, curl_getinfo, curl_init, curl_setopt

    For the dom extension, the following classes need to be available:

    DOMAttr, DOMComment, DOMDocument, DOMElement, DOMNode,DOMNodeList,DOMXPath`

    You can verify the existence of these classes / functions by using function_exists() and class_exists()

    Thread Starter Doidel

    (@doidel)

    Thank you for your help.

    The result was, that I hadn’t updated php-fpm, just php.
    Looking at WP’s Site Health tool showed that WP was still running 7.3, while the Ubuntu console php version was 7.4. Then I noticed that only the service php7.3-fpm was running, but not 7.4. I therefore had to install it manually:
    sudo apt install php7.4-fpm
    I then uninstalled 7.3
    sudo apt purge php7.3
    sudo apt purge php7.3-fpm
    Then I had to change the fastcgi version in the nginx conf to 7.4 (in my case in /etc/nginx/sites-available/default as well as in /etc/nginx/nginx.conf)
    Restart nginx, then I was set.
    sudo service nginx restart

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘APM plugin doesn’t recognize curl/dom?’ is closed to new replies.