# Call to undefined function xml_parser_create()

**URL:** https://discourse.roots.io/t/call-to-undefined-function-xml-parser-create/6013
**Category:** trellis
**Created:** 2016-02-23T22:59:29Z
**Posts:** 3

## Post 1 by @brandon — 2016-02-23T22:59:29Z

Hey there folks.

I’m running into an issue with a brand new install (local) where I’m getting errors for `xml_parser_create`.

In Wordpress, having Jetpack installed, I was getting this error: `PHP Fatal error: Call to undefined function xml_parser_create() in /var/www/html/wp-includes/class-IXR.php on line 264`

Removing Wordpress from the equation, I created a file called `parse.php` and just had these lines:

```
<?php
$xml_parser = xml_parser_create("");
print $xml_parser;
?>
```

This gives me the error:

```
( ! ) Fatal error: Uncaught Error: Call to undefined function xml_parser_create() in /srv/www/caltonnutrition.com/current/web/parse.php on line 2
( ! ) Error: Call to undefined function xml_parser_create() in /srv/www/caltonnutrition.com/current/web/parse.php on line 2
```

Upon googling further, it appears that this happens the XML extension of PHP is not properly installed.

I added to `roles/php/main.yml`:

```
- name: Install PHP 7.0
  apt:
    name: "{{ item }}"
    state: present
    force: yes
  with_items:
  - php7.0-xmlrpc
```

in hopes that it would work, but alas it hasn’t.

I’ve gone and reinstalled vagrant three or four times just to make sure I’m not doing something wrong.

Further debugging in making a php file with just `phpinfo();` shows that `/etc/php/7.0/fpm/conf.d/20-xmlrpc.ini` is being loaded as you can see here: [http://i.imgur.com/vHppwCk.png](http://i.imgur.com/vHppwCk.png)

---

## Post 2 by @austin — 2016-02-24T00:45:55Z

XML rpc has nothing to do with Xml parsing. Make sure php7.0-xml is installed.

php7.0-xml needs to be in trellis by default if it’s not already.

> <https://wordpress.stackexchange.com/questions/42098/what-are-php-extensions-and-libraries-wp-needs-and-or-uses/42212#42212>

---

## Post 3 by @brandon — 2016-02-24T01:00:04Z

> [@austin](#):
>
> [server - What are PHP extensions and libraries WP needs and/or uses? - WordPress Development Stack Exchange](http://wordpress.stackexchange.com/a/42212)

That was the fix. Thank you @austin . Submitting a PR now.
