Guest User

Untitled

a guest
Oct 17th, 2017
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. ## machine info
  2.  
  3. [root@VIRTCENT09:~] #cat /etc/redhat-release
  4. CentOS release 5.6 (Final)
  5.  
  6. [root@VIRTCENT09:~] #uname -a
  7. Linux VIRTCENT09.summitnjhome.com 2.6.18-238.el5xen #1 SMP Thu Jan 13 17:49:40 EST 2011 i686 i686 i386 GNU/Linux
  8.  
  9.  
  10. ## postgres version
  11.  
  12.  
  13. psql (PostgreSQL) 8.4.8
  14. contains support for command-line editing
  15.  
  16.  
  17. ## drupal database
  18.  
  19.  
  20. Name | Owner | Encoding | Collation | Ctype | Access privileges
  21. -----------+----------+----------+-------------+-------------+-----------------------
  22. drupal | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
  23. forums | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
  24. postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
  25. template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
  26. : postgres=CTc/postgres
  27. template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
  28. : postgres=CTc/postgres
  29. (5 rows)
  30.  
  31.  
  32. ## php can connect to pgsql from web server
  33.  
  34.  
  35. [root@VIRTCENT07:/home/bluethundr/php] #cat connect.php
  36. <?php
  37. if ($dbconn = pg_connect("host=db1 dbname=drupal port=5432 user=drupaladmin password=secret")) echo "Great success!!\n";
  38. ?>
  39.  
  40.  
  41. [root@VIRTCENT07:/home/bluethundr/php] #php connect.php
  42. Great success!!
Add Comment
Please, Sign In to add comment