jgab's picture

Hi, I would like to install PIWIK (Piwik is an open source alternative to Google Analytics) on the LAMP appliance.

One of the Piwik requirements is to have installed the PHP extensions pdo and pdo_mysql.

How can I install them on the LAMP appliance?

Thanks for your help!

Forum: 
Liraz Siri's picture

Remember that TurnKey Linux is Ubuntu under the hood so nearly all of the information you'll find online that applies to Ubuntu and Debian will also apply to TurnKey Linux.

apt-get install php-pear php5-dev libmysqlclient15-dev
pecl install pdo
pecl install pdo_mysql
Jeremy Davis's picture

So if you aren't root, then you'll need to prefix commands with 'sudo'.

Also FWIW this thread is quite old, so may not still be 100% relevant.

Alon Swartz's picture

You might also need to add the following to /etc/php5/apache2/php.ini
extension=pdo.so
extension=pdo_mysql.so
And ofcourse, don't forget to restart apache2.
Jeremy Davis's picture

But from a quick google it seems they are a default part of php (since v5.1 - TKL v11.x has v5.3). I would assume that it is enabled by default, but if not then I imagine you just need to add it to the php.ini file (see Alon's post above).

Jeremy Davis's picture

Turnkey is now based on Debian and whilst they are close, they're not the same... You may get lucky, but I doubt you'll get an answer here... Sorry

Jeremy Davis's picture

Or similar? Probably best to start a new thread as it's not really relevant here...

Also please provide a few more details about your setup, e.g. clarify that you are running in VirtualBox, if not what? What image (e.g. ISO or VMDK)?

If you didn't mean the TurnKey Linux CodeIgniter appliance then you're in the wrong place... This is the TurnKey Linux forums...

Don Patria's picture

how to install pdo_sqlsrv extension on nginx php fastcgi? 

Jeremy Davis's picture

FYI TurnKey is based on Debian (v16.x based on Debian 10/Buster), so I googled "install mssql php debian 10" and I found a post in the Microsoft docs and what appears to be exactly the same thing on Microsoft's GitHub.

Please note that TurnKey Nginx-PHP-FastCGI has PHP 7.3 pre-installed (from the official Debian repositories). Unless you explicitly need a newer version of PHP you are strongly advised to stick with the version provided by Debian.

Also, it's generally considered poor forum etiquette to "necro-post" (i.e. post on really old threads). As a general rule, it's best to start your own thread.

Add new comment