Installation PHP error

(unknownprof) #1

Hoping someone can help.

I just installed Piwik onto my FreeBSD server (successful done this for other servers) and I get the following error:

When using PHP < 5.2.0, Piwik requires the PHP extension XML.
Please install this extension to continue using Piwik.
More information on

However I have PHP 5.2.9 installed… and the link in there is not clear on how I would install the PHP extension XML.

Ultimately I am a bit confused and could use some help.


(vipsoft) #2

Add a page that returns the output of phpinfo();

I’m guessing your web server is pointing/linked to an older php version.

(unknownprof) #3

Thanks so much for replying and sorry for the long delay in my reply.

I ran phpinfo and it confirmed that I am running php 5.2.9.

Still a bit confused as to why this might happen… ?

(vipsoft) #4

Ok. I looked into this and will try to tweak the error message in the next version.

The problem is that your php build doesn’t have the json extension. I believe this is enabled by default in php 5.2.x but was disabled or excluded in your build/distro. As a fallback, there are emulated functions written in php, but these require the XML extension – which you also don’t have…

You have to rebuild or download pre-built modules. (Sorry. I’m not familiar with the packaging system on FreeBSD.)