I'm trying to install the PHP statistics package on my Ubuntu 16.04 LTS server, and I'm stuck.
First off, config stuff:
$ apache2 -v
Apache/2.4.18 (Ubuntu)
$ php -v
PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )
$ pear -V
PEAR Version: 1.10.1
I have successfully added pear using apt-get as well as php-all-dev
.
When I try to install the stats package with pecl, I get the following:
$ pecl install stats
pecl/stats is already installed and is the same as the released version 1.0.5
I have also added extension=stats.so
to my php.ini
and restarted apache.
But when I try to run any of the stats functions, I get the following error:
Fatal error: Uncaught Error: Call to undefined function stats_standard_deviation() in /var/www/html/testing/stats_library.php:14 Stack trace: #0 {main} thrown in /var/www/html/testing/stats_library.php on line 14
What am I missing?
I was able to successfully add the extension by adding the version to the install command like this:
$ pecl install stats-2.0.3
I then added extension=stats.so
to my php.ini
and restarted apache. Everything works now!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With