Portal Home > Knowledgebase > Articles Database > pdo_pgsql


pdo_pgsql




Posted by Calibaba, 11-19-2008, 03:04 PM
pdo_pgsql Can someone please explain how to enable pdo_pgsql module on a Centos / Cpanel box? Apache is already compiled with PDO (via whm) but it seems to be for mysql only. phpinfo does show pgsql but not pdo_pgsql. Thanks.

Posted by cascoing, 11-19-2008, 03:56 PM
Check out this.http://in2.php.net/manual/en/ref.pdo-pgsql.php

Posted by Calibaba, 11-19-2008, 03:58 PM
That' doesn't help. It does not explain how to enable it on a Cpanel box.

Posted by Patrick, 11-19-2008, 04:20 PM
Have you tried:pecl install pdo_pgsql Following by restarting Apache:/usr/local/apache/bin/apachectl restart __________________|- SYN Hosting - Affordable, Reliable

Posted by Calibaba, 11-19-2008, 04:23 PM
root@server [~]# pecl install pdo_pgsql downloading PDO_PGSQL-1.0.2.tgz ... Starting to download PDO_PGSQL-1.0.2.tgz (14,961 bytes) .....done: 14,961 bytes downloading PDO-1.0.3.tgz ... Starting to download PDO-1.0.3.tgz (52,613 bytes) ...done: 52,613 bytes 12 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO-1.0.3 running: /root/tmp/pear/PDO/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO/configure' failed 7 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO_PGSQL-1.0.2 running: /root/tmp/pear/PDO_PGSQL/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO_PGSQL/configure' failed

Posted by Patrick, 11-19-2008, 04:29 PM
I'm guessing you have noexec turned on for /var/tmp ? If you're not sure, post the output from: cat /etc/fstab | grep tmp

Posted by Calibaba, 11-19-2008, 04:30 PM
Thanks for your help. Yes, its turned on. cat /etc/fstab | grep tmp none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 /usr/tmpDSK /tmp ext3 defaults,noauto 0 0 /tmp /var/tmp ext3 defaults,bind,noauto 0 0

Posted by Patrick, 11-19-2008, 04:45 PM
I'm not sure if this will work on Linux, but you could try: umount /dev/shm mount /dev/shm Then: pecl install pdo_pgsql If that doesn't work, post the output from: df -h | grep tmp

Posted by Calibaba, 11-19-2008, 04:47 PM
root@server [~]# umount /dev/shm root@server [~]# mount /dev/shm root@server [~]# pecl install pdo_pgsql downloading PDO_PGSQL-1.0.2.tgz ... Starting to download PDO_PGSQL-1.0.2.tgz (14,961 bytes) .....done: 14,961 bytes downloading PDO-1.0.3.tgz ... Starting to download PDO-1.0.3.tgz (52,613 bytes) ...done: 52,613 bytes 12 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO-1.0.3 running: /root/tmp/pear/PDO/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO/configure' failed 7 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO_PGSQL-1.0.2 running: /root/tmp/pear/PDO_PGSQL/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO_PGSQL/configure' failed root@server [~]# df -h | grep tmp /usr/tmpDSK 2.0G 40M 1.8G 3% /tmp /tmp 2.0G 40M 1.8G 3% /var/tmp

Posted by Patrick, 11-19-2008, 04:53 PM
Oops, edit /etc/fstab and change: none /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0 tonone /dev/shm tmpfs rw,nodev 0 0 Save the file, then:umount /dev/shm mount /dev/shm pecl install pdo_pgsql Make sure there are no other nosuid,noexec entries in /etc/fstab for the time being.

Posted by Calibaba, 11-19-2008, 04:57 PM
pecl install pdo_pgsql downloading PDO_PGSQL-1.0.2.tgz ... Starting to download PDO_PGSQL-1.0.2.tgz (14,961 bytes) .....done: 14,961 bytes downloading PDO-1.0.3.tgz ... Starting to download PDO-1.0.3.tgz (52,613 bytes) ...done: 52,613 bytes 12 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO-1.0.3 running: /root/tmp/pear/PDO/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO/configure' failed 7 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend Module Api No: 20060613 Zend Extension Api No: 220060519 building in /var/tmp/pear-build-root/PDO_PGSQL-1.0.2 running: /root/tmp/pear/PDO_PGSQL/configure checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. ERROR: `/root/tmp/pear/PDO_PGSQL/configure' failed Code: # This file is edited by fstab-sync - see 'man fstab-sync' for details LABEL=/ / ext3 defaults,usrquota 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs rw,nodev 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 LABEL=SWAP-sdb2 swap swap defaults 0 0 /dev/sda1 /backup ext3 defaults 1 2 /usr/tmpDSK /tmp ext3 defaults,noauto 0 0 /tmp /var/tmp ext3 defaults,bind,noauto 0 0 /dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0

Posted by Patrick, 11-19-2008, 05:02 PM
Hrm, did you use cPanel's /scripts/securetmp by any chance? Run mount and post the output here... I just want to double check before we umount /tmp as it may interfere with MySQL.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
WSUS without AD (Views: 408)
zipped db backup (Views: 428)