PECL is a repository for PHP extensions. It’s where old extensions go to die and new extensions are developed. In a previous post I gave the commands to install PDO from PECL but forgot to mention that before you can install anything from PECL you need to install the php5-dev package first.
% sudo apt-get install php5-dev
You need to install the dev package because PECL extensions are compiled into PHP. This should tell you two important things:
- Be very careful when deciding which extensions to include. While an unstable PEAR package might cause your application to fail a bad PECL extension can cause your web server to crash.
- When you upgrade PHP you will probably need to reinstall the PECL extension.
This site contains my personal ramblings on Linux, PHP, Java, .NET and anything else that I feel is important.
I just tried to install PECL as per above and it didn’t install.
I did end up getting it by installing PEAR.
Cheers,
Ian
4.
how about in pgsql? I am using pgsql for my database. I had installed pdo using pecl, then I added extension=pdo.so in my php.ini.When I restart my apache and browse my localhost there is a
Fatal error: Class ‘PDO’ not found in /var/www/repos/php_iTranscribe-admin/db.inc on line 21
displayed in my browser.
Anybody help me to solve this..
Version of my ubuntu is 6.10
php is 5.1.6
apache 2
Thank you in advance.
cheers,
Smiley
PDO isn’t enabled by default in PHP 5.1. I’d recommend upgrading to a more recent version of Ubuntu. If you can’t do that then follow the instructions at http://www.buggy.id.au/2007/02/19/installing-pdo-on-ubuntu but compile the pgsql driver instead of the mysql driver.