Postgresql support for PHP in Slackware
Slackware lacks postgresql support, so porting PHP webapps on a new server is a trouble. This article solved my problem in less then ten minutes.
![]() |
http://www.heritage-tech.net/165/getting-additional-php-modules-without-totally-recompiling/ |
In short
You need only the PHP pgsql.so module
Verify with pkgtool what's your PHP version, mine is 5.2.6 (Slackware 12.1)
Download in /usr/local/src the PHP sources, I take them from php.net website using this link
http://www.php.net/get/php-5.2.8.tar.bz2/from/a/mirror
replacing the version number
http://www.php.net/get/php-5.2.6.tar.bz2/from/a/mirror
extract the compressed tarball, dive into the newly created directory and, as article say, type
./configure --with-pgsql=shared,/usr
then
make
Now copy the module in the corrected directory
cp modules/pgsql.so /usr/lib/php/extensions/
open with an editor /etc/httpd/php.ini and add this line
extension=pgsql.so
approx at line 652
restart apache
/etc/rc.d/rc.httpd restart
done
other useful references
![]() |
https://www.linuxquestions.org/questions/slackware-14/php-extension-for-postgresql-383312/ |
![]() |
http://dan.drydog.com/apache2php.html |
![]() |
http://bytes.com/groups/postgresql/420655-php-slackware |
compiled on slackware 13.0 postgresql 8.4.1 gcc-4.3.3
pgsql-5.2.11.so
08c0abb1ef942a63e93962a6c0dae0e1
so, 233.8 KB, 07/06/2010, 15 downloads
pgsql-5.2.10.so
67ee6ac9b027d055f5676c0255f1401b
so, 233.9 KB, 07/06/2010, 13 downloads
compiled on slack12.0 postgresql 8.2.4 gcc-4.1.2
pgsql-5.2.4.so
cd81ff25653da2108a8d20e14ca977fb
so, 229.6 KB, 11/03/2009, 144 downloads
pgsql-5.2.5.so
bd9d8d4ae91661875589e488cf46457b
so, 230.2 KB, 11/03/2009, 110 downloads
pgsql-5.2.6.so
6a3bae588b01e7caf4e0ed945e889401
so, 231.2 KB, 11/03/2009, 149 downloads
pgsql-5.2.8.so
b3ebcb67480dde0ef73c6eb676b9c33a
so, 236.4 KB, 11/03/2009, 117 downloads
pgsql-5.2.9.so
82d2f1d98e0383fa0e2d63752bc3e01d
so, 233.2 KB, 11/03/2009, 161 downloads
