This forum is no longer active. Please post your questions to our new community site

Forums LAPPStack

PDO without PDO_PGSQL driver

Subscribe to PDO without PDO_PGSQL driver 5 post(s), 2 voice(s)

 
Avatar deposto 3 post(s)

Great work on LAPP.

I’m running (and learning) Zend Framework 1.9.x on top of LAPP-1.1-4 in my little Acer Aspire One (Linpus Linux Lite)… while commuting by train!

Everything was fine until I attempted my first db connection. At that moment I got this exception by Zend_Db_Adapter: “The pgsql driver is not installed”.

I’ve checked phpinfo() and the PDO drivers which are enabled are sqlite and sqlite2.

I’ve tried to install PDO_PGSQL via pecl but had no luck (got stuck with an old cpp, I guess).

Anything else I can do?

Thanks in advance,
Eduardo

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

You are right, we have checked and we do not include support for pdo_pgsql. We will include this extension for the next version of LAPP Stack.

As a workaround, could you try to download this extension? Copy it into installation_directory/php/lib/php/extensions folder and write the following in the installation_directory/php/etc/php.ini file:


;;;;;;;;;;;;;;;;;;;;;;                                                          
; Dynamic Extensions ;                                                          
;;;;;;;;;;;;;;;;;;;;;;

extension=pdo_pgsql.so

Then restart the Apache server and check it in your phpinfo().

I hope it helps.

 
Avatar deposto 3 post(s)

Hi,

Thanks for your fast reply.

I’ve tried to install pdo_pgsql following your instructions. After I restarted apache there was no reference to pdo_pgsql in phpinfo() and, in the apache error log, I could see the following PHP warning:

«««
PHP Warning: PHP Startup: Unable to load dynamic library ‘home/user/lappstack-1.1-4/php/lib/php/extensions/pdo_pgsql.po’ – /home/user/lappstack-1.1-4/php/lib/php/extensions/pdo_pgsql.po: cannot open shared object file: No such file or directory in Unknown on line 0
»»»

I’ve double checked all the paths/filenames. My last attempt was to reinstall the stack into another directory. But again, the same error.

I don’t know if I am doing something wrong…

Regards,
Eduardo

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

I think that the problem is the file extension. Please change your php.ini file to use “pdo_pgsql.so” instead of “pdo_pgsql.po”.

Cheers.

 
Avatar deposto 3 post(s)

Sorry. I guess I should have tripled checked my settings…
Now everything works!
PHP is able to load pdo_pgsql and I have a db connection.

Thanks for all the help and keep up the good work,
E.

Forums LAPPStack