Permalink
Browse files

#2869 . unix domain socket connection for phppgadmin

  • Loading branch information...
1 parent eac5680 commit 605ea45f48fa3dea7a1f0abe02e173d520f4a2b5 @mcr committed Jul 19, 2011
Showing with 189 additions and 5 deletions.
  1. +1 −1 .gitignore
  2. +2 −2 Makefile
  3. +34 −0 apache2.conf.in
  4. +2 −2 php.ini.in
  5. +140 −0 php/conf/config.inc.php.in
  6. +10 −0 runweb.sh.in
View
@@ -5,4 +5,4 @@ apache2.conf
php.ini
runweb.sh
shutit.sh
-
+php/conf/config.inc.php
View
@@ -47,7 +47,7 @@ run/dbinit: run/dirs ${SCRIPTDIR}/bootstrap.sql
${INITDB} -D ${DBCLUSTER}
cp ${SCRIPTDIR}/pg_hba.conf ${DBCLUSTER}
${POSTMASTER} -D ${DBCLUSTER} ${TCPIP} -k ${DBPATH} > run/log/postgresql.log 2>&1 &
- sleep 5
+ sleep 10
${PSQL} -h ${DBPATH} -f ${SCRIPTDIR}/bootstrap.sql template1
${PG_CTL} -D ${DBCLUSTER} stop
touch run/dbinit
@@ -101,7 +101,7 @@ ${SCRIPTDIR}/database.yml: ${SCRIPTDIR}/database.yml.in Makefile
${SCRIPTDIR}/database.yml.in >${SCRIPTDIR}/database.yml
@echo You can enable by: cp ${SCRIPTDIR}/database.yml config/database.yml
-apache: ${SCRIPTDIR}/apache2.conf ${SCRIPTDIR}/runweb.sh ${SCRIPTDIR}/php.ini
+apache: ${SCRIPTDIR}/apache2.conf ${SCRIPTDIR}/runweb.sh ${SCRIPTDIR}/php.ini ${SCRIPTDIR}/php/conf/config.inc.php
${SCRIPTDIR}/runweb.sh
apachestop: ${SCRIPTDIR}/shutit.sh
View
@@ -101,6 +101,22 @@ LoadModule php5_module @PHP5_MODDIR@/libphp5.so
# Include all the end-user configurations:
#Include @SCRIPTDIR@/httpd.conf
+Alias /phppgadmin @TOPDIR@/run/phppgadmin/
+<Directory @TOPDIR@/run/phppgadmin/>
+ DirectoryIndex index.php
+ Options +FollowSymLinks
+ AllowOverride None
+ order deny,allow
+ deny from all
+ allow from 127.0.0.0/255.0.0.0 ::1/128
+ # allow from all
+ <IfModule mod_php5.c>
+ php_flag magic_quotes_gpc Off
+ php_flag track_vars On
+ php_value include_path .
+ </IfModule>
+</Directory>
+
#Let's have some Icons, shall we?
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
@@ -238,6 +254,24 @@ AddIcon /icons/blank.gif ^^BLANKICON^^
#AddIcon /icons/dirsymlink.jpg ^^SYMDIR^^
#AddIcon /icons/symlink.jpg ^^SYMLINK^^
+<IfModule mpm_prefork_module>
+ StartServers 1
+ MinSpareServers 1
+ MaxSpareServers 10
+ MaxClients 150
+ MaxRequestsPerChild 0
+</IfModule>
+
+<IfModule mpm_worker_module>
+ StartServers 1
+ MinSpareThreads 1
+ MaxSpareThreads 75
+ ThreadLimit 64
+ ThreadsPerChild 25
+ MaxClients 150
+ MaxRequestsPerChild 0
+</IfModule>
+
DefaultIcon /icons/unknown.gif
ReadmeName README.html
View
@@ -180,7 +180,7 @@ safe_mode_gid = Off
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
-safe_mode_include_dir = @ITERationSRCDIR@/php
+safe_mode_include_dir = @TOPDIR@/php
; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
@@ -423,7 +423,7 @@ default_mimetype = "text/html"
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
-include_path = ".:@ITERationSRCDIR@/php"
+include_path = ".:@TOPDIR@/php:@TOPDIR@/@SCRIPTDIR@/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
View
@@ -0,0 +1,140 @@
+<?php
+
+ /**
+ * Central phpPgAdmin configuration. As a user you may modify the
+ * settings here for your particular configuration.
+ *
+ * $Id: config.inc.php-dist,v 1.55 2008/02/18 21:10:31 xzilla Exp $
+ */
+
+ // An example server. Create as many of these as you wish,
+ // indexed from zero upwards.
+
+ // Display name for the server on the login screen
+ $conf['servers'][0]['desc'] = 'LOCAL';
+
+ // Hostname or IP address for server. Use '' for UNIX domain socket.
+ // use 'localhost' for TCP/IP connection on this computer
+ $conf['servers'][0]['host'] = '@DBPATH@';
+
+ // Database port on server (5432 is the PostgreSQL default)
+ $conf['servers'][0]['port'] = '5432';
+
+ // Database SSL mode
+ // Possible options: disable, allow, prefer, require
+ // To require SSL on older servers use option: legacy
+ // To ignore the SSL mode, use option: unspecified
+ $conf['servers'][0]['sslmode'] = 'allow';
+
+ // Change the default database only if you cannot connect to template1.
+ // For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
+ $conf['servers'][0]['defaultdb'] = 'template1';
+
+ // Specify the path to the database dump utilities for this server.
+ // You can set these to '' if no dumper is available.
+ $conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
+ $conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
+
+ // Slony (www.slony.info) support?
+ $conf['servers'][0]['slony_support'] = false;
+ // Specify the path to the Slony SQL scripts (where slony1_base.sql is located, etc.)
+ // No trailing slash.
+ $conf['servers'][0]['slony_sql'] = '/usr/share/slony1';
+
+ // Example for a second server (PostgreSQL for Windows)
+ //$conf['servers'][1]['desc'] = 'Test Server';
+ //$conf['servers'][1]['host'] = '127.0.0.1';
+ //$conf['servers'][1]['port'] = 5432;
+ //$conf['servers'][1]['sslmode'] = 'allow';
+ //$conf['servers'][1]['defaultdb'] = 'template1';
+ //$conf['servers'][1]['pg_dump_path'] = 'C:\\Program Files\\PostgreSQL\\8.0\\bin\\pg_dump.exe';
+ //$conf['servers'][1]['pg_dumpall_path'] = 'C:\\Program Files\\PostgreSQL\\8.0\\bin\\pg_dumpall.exe';
+ //$conf['servers'][1]['slony_support'] = false;
+ //$conf['servers'][1]['slony_sql'] = 'C:\\Program Files\\PostgreSQL\\8.0\\share';
+
+ // Default language. E.g.: 'english', 'polish', etc. See lang/ directory
+ // for all possibilities. If you specify 'auto' (the default) it will use
+ // your browser preference.
+ $conf['default_lang'] = 'auto';
+
+ // AutoComplete uses AJAX interaction to list foreign key values
+ // on insert fields. It currently only works on single column
+ // foreign keys. You can choose one of the following values:
+ // 'default on' enables AutoComplete and turns it on by default.
+ // 'default off' enables AutoComplete but turns it off by default.
+ // 'disable' disables AutoComplete.
+ $conf['autocomplete'] = 'default on';
+
+ // If extra login security is true, then logins via phpPgAdmin with no
+ // password or certain usernames (pgsql, postgres, root, administrator)
+ // will be denied. Only set this false once you have read the FAQ and
+ // understand how to change PostgreSQL's pg_hba.conf to enable
+ // passworded local connections.
+ $conf['extra_login_security'] = true;
+
+ // Only show owned databases?
+ // Note: This will simply hide other databases in the list - this does
+ // not in any way prevent your users from seeing other database by
+ // other means. (e.g. Run 'SELECT * FROM pg_database' in the SQL area.)
+ $conf['owned_only'] = false;
+
+ // Display comments on objects? Comments are a good way of documenting
+ // a database, but they do take up space in the interface.
+ $conf['show_comments'] = true;
+
+ // Display "advanced" objects? Setting this to true will show
+ // aggregates, types, operators, operator classes, conversions,
+ // languages and casts in phpPgAdmin. These objects are rarely
+ // administered and can clutter the interface.
+ $conf['show_advanced'] = false;
+
+ // Display "system" objects?
+ $conf['show_system'] = false;
+
+ // Display reports feature? For this feature to work, you must
+ // install the reports database as explained in the INSTALL file.
+ $conf['show_reports'] = true;
+
+ // Database and table for reports
+ $conf['reports_db'] = 'phppgadmin';
+ $conf['reports_schema'] = 'public';
+ $conf['reports_table'] = 'ppa_reports';
+
+ // Only show owned reports?
+ // Note: This does not prevent people from accessing other reports by
+ // other means.
+ $conf['owned_reports_only'] = false;
+
+ // Minimum length users can set their password to.
+ $conf['min_password_length'] = 1;
+
+ // Width of the left frame in pixels (object browser)
+ $conf['left_width'] = 200;
+
+ // Which look & feel theme to use
+ $conf['theme'] = 'default';
+
+ // Show OIDs when browsing tables?
+ $conf['show_oids'] = false;
+
+ // Max rows to show on a page when browsing record sets
+ $conf['max_rows'] = 30;
+
+ // Max chars of each field to display by default in browse mode
+ $conf['max_chars'] = 50;
+
+ // Send XHTML strict headers?
+ $conf['use_xhtml_strict'] = false;
+
+ // Base URL for PostgreSQL documentation.
+ // '%s', if present, will be replaced with the PostgreSQL version
+ // (e.g. 7.3 )
+ $conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/';
+
+ /*****************************************
+ * Don't modify anything below this line *
+ *****************************************/
+
+ $conf['version'] = 19;
+
+?>
View
@@ -14,6 +14,16 @@ if [ ! -x ${WEBSERVER} ]; then
fi
fi
+if [ -d /usr/share/phppgadmin ]; then
+ mkdir -p $ServerRoot/run/phppgadmin
+ (cd $ServerRoot/run/phppgadmin;
+ ln -f -s /usr/share/phppgadmin/* .
+ rm -f conf
+ mkdir conf
+ cp $ScriptDir/php/conf/config.inc.php conf )
+fi
+
+
mkdir -p $ServerRoot/run/lock/apache2
mkdir -p $ServerRoot/run/log/apache2

0 comments on commit 605ea45

Please sign in to comment.