the premier web-based administration tool for postgresql working on Cloud Foundry
PHP JavaScript HTML Other
Pull request Compare This branch is 7 commits ahead, 4 commits behind phppgadmin:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
classes Fix SF Bug #446 pagination not changing page (through select). Mar 5, 2015
conf remove config.inc.php ignored May 6, 2015
help Fix help links for pg 9.3 / 9.4 Feb 16, 2015
images/themes Bootstrap theme Feb 9, 2015
js Fix an issue with population of FK fields using autocomplete. Nov 28, 2012
lang Update turkish.php Jan 25, 2015
libraries Add dynamic theme based on current server, database or user used for … Nov 11, 2013
plugins Fix creating report from user query result in plugin Report Nov 11, 2013
tests Admin processes test didnt seem to know about 'blocked' column. It do… Jan 25, 2015
themes Bootstrap theme Feb 9, 2015
vendor PhpPgAdmin working with cloud foundry easily Apr 16, 2015
xloadtree Quick Fix on the xloadtree code about bad html specialchars escaping … Sep 29, 2010
.gitattributes add .gitattribute file to exclude some files when creating an archive… Mar 28, 2010
.gitignore Make selenium tests full dynamics, no more build_tests.php required. Dec 29, 2011
BUGS Update BUGS CREDITS HISTORY and TODO before release Nov 29, 2010
CREDITS Update History and Credits based on recent patches Feb 16, 2015
DEVELOPERS clean up some developer suggestions Feb 16, 2015
FAQ overhaul the cant connect question, plus other fixes Jan 1, 2010
HISTORY Update History and Credits based on recent patches Feb 16, 2015
INSTALL reword information around statistics collector. based on bug report S… Mar 26, 2013
LICENSE Update copyright notices. Dec 18, 2005
README.md Update README.md Oct 13, 2016
TODO Add line item to "TODO" about Materialized Views Jan 25, 2015
TRANSLATORS Makes phpPgAdmin core full UTF-8 only. Dec 30, 2011
admin.php Cosmetic fix on Vacuum confirmation page for the "Freeze" checkbox Apr 23, 2013
aggregates.php Give environnments vars to the navlink hook Aug 22, 2012
ajax-ac-insert.php Makes phpPgAdmin core full UTF-8 only. Dec 30, 2011
all_db.php Give environnments vars to the navlink hook Aug 22, 2012
browser.php Add dynamic theme based on current server, database or user used for … Nov 11, 2013
casts.php Add support for 'tree' hooks in the plugin architecture. Aug 22, 2012
colproperties.php Give environnments vars to the navlink hook Aug 22, 2012
composer.json PhpPgAdmin working with cloud foundry easily Apr 16, 2015
composer.lock PhpPgAdmin working with cloud foundry easily Apr 16, 2015
constraints.php Give environnments vars to the navlink hook Aug 22, 2012
conversions.php Add support for 'tree' hooks in the plugin architecture. Aug 22, 2012
database.php Add file upload capability to SQL popup window Feb 12, 2015
dataexport.php Fix downloading result from very long user query Nov 11, 2013
dataimport.php Fixes about using html chars in object names. Fix bug #1607047. More … May 11, 2009
dbexport.php Fix dbexport.php file, various bugs, see details Aug 26, 2010
display.php improve data management navigation; adds browse/search options to tab… Feb 16, 2015
domains.php Fix syntax bug in domain.php and remove debug messages Aug 22, 2012
fulltext.php Give environnments vars to the navlink hook Aug 22, 2012
functions.js XHTML compliance. Apr 23, 2007
functions.php make blank msg lines consistent Jul 20, 2014
groups.php Give environnments vars to the navlink hook Aug 22, 2012
help.php Localize help.php . Use 'drop' instead of 'remove' in Slony. Print st… Dec 31, 2006
history.php Give environnments vars to the navlink hook Aug 22, 2012
index.php We are using XHTML now and HTML is not an option. The headers config … Apr 18, 2007
indexes.js Extensive trigger and index improvements from Felix Meinhold (Felix.M… Mar 12, 2003
indexes.php Give environnments vars to the navlink hook Aug 22, 2012
info.php Add support for 'actionbuttons' hooks in the plugin architecture. Aug 22, 2012
intro.php Make selenium tests full dynamics, no more build_tests.php required. Dec 29, 2011
languages.php Add support for 'tree' hooks in the plugin architecture. Aug 22, 2012
links.js Wide-spread improvements to navigation tabs. Jul 13, 2004
loader.php PhpPgAdmin working with cloud foundry easily Apr 16, 2015
login.php Instanciate $plugin_manager from login.php script if needed Apr 5, 2013
logout.php support sessions for browser with no cookies Sep 10, 2003
manifest.yml PhpPgAdmin working with cloud foundry easily Apr 16, 2015
multiactionform.js initial support for multi-action options with support for tables. Thi… Mar 3, 2007
opclasses.php Add support for 'tree' hooks in the plugin architecture. Aug 22, 2012
operators.php Fix syntax bug in domain.php and remove debug messages Aug 22, 2012
plugin.php Add skeleton of the plugin architecture Aug 22, 2012
privileges.php Fix PHP notice on database privilege page Sep 30, 2012
redirect.php Fixes PHP 5.4 Strict errors Nov 4, 2012
robots.txt prevent search engines from indexing Sep 1, 2003
roles.php Give environnments vars to the navlink hook Aug 22, 2012
rules.php Give environnments vars to the navlink hook Aug 22, 2012
schemas.php make blank msg lines consistent Jul 20, 2014
sequences.php make blank msg lines consistent Jul 20, 2014
servers.php doTree() does not take an argument. May 24, 2013
sql.php Fix downloading result from very long user query Nov 11, 2013
sqledit.php Add file upload capability to SQL popup window Feb 12, 2015
tables.js Add automagic enable/disable of length attribute based on selected ty… Aug 18, 2006
tables.php improve data management navigation; adds browse/search options to tab… Feb 16, 2015
tablespaces.php Give environnments vars to the navlink hook Aug 22, 2012
tblproperties.php Use cleaner class names for comments cells and constaints icons Nov 17, 2013
triggers.php Give environnments vars to the navlink hook Aug 22, 2012
types.php Give environnments vars to the navlink hook Aug 22, 2012
users.php Give environnments vars to the navlink hook Aug 22, 2012
viewproperties.php Give environnments vars to the navlink hook Aug 22, 2012
views.php improve data management navigation; adds browse/search options to tab… Feb 16, 2015

README.md

phpPgAdmin - Cloud Foundry Ready

This version is a real fork from phpPgAdmin. It can be use with service provided by Dingo PostgreSQL, postgresql-cf-service-broker, and others.

It use cf-helper-php to auto-binding postgresql service on phpPgAdmin.

Installation & usage

Just 5 steps:

  1. Download the zip file from here: https://github.com/cloudfoundry-community/phppgadmin-cf/archive/cf-ready.zip.
  2. Unzip it
  3. Go inside the unzipped folder and run cf push --no-start -n phppgadmin-SPACENAME
  4. If needed create a user-provided service to connect to an existing remote pg instance (e.g. cf cups ccdb-pg -p '{"uri":"postgres://192.168.131.8:5524/ccdb"}' )
  5. Bind your postgresql service with cf bs phppgadmin-cfready <service_name> and repeat for all postgresql services you want in your phpPgAdmin
  6. Restage the service with cf restage phppgadmin-cfready
  7. Connect to phpPgAdmin through its HTTP route, and select the db instance to connect to from the list, and specify associated login/password of the pgdb to access

Combo

Bonus command to deploy the app, discover and bind all "postgresql" tagged service instances in the current space to the phppgadmin-cfready application, using cf curl, jq, and xargs:

git clone https://github.com/cloudfoundry-community/phppgadmin-cf -b cf-ready
cd phppgadmin-cf
appname=phppgadmin
space_guid=$(cat ~/.cf/config.json| jq -r ".SpaceFields.GUID")
space_name=$(cat ~/.cf/config.json| jq -r ".SpaceFields.Name")
org_name=$(cat ~/.cf/config.json| jq -r ".OrganizationFields.Name")
app_hostname="phppgadmin-${org_name}-${space_name}"
cf push ${appname} --no-start -n ${app_hostname}
cf curl /v2/services | jq -r ".resources[] | select(.entity.tags | contains([\"postgresql\"])) | .entity.service_plans_url" | xargs -L1 cf curl | jq -r ".resources[].entity.service_instances_url" | awk "{print \$1\"\\\\?q=space_guid:${space_guid}\"}" | xargs -L1 cf curl | jq -r ".resources[].entity.name" | xargs -L1 cf bind-service ${appname}
cf restart ${appname}

Yeah, cf curl, jq and xargs are pretty fantastic when combined together.

To dump all the credentials for all the bound databases, try:

cf curl /v2/apps\?q=name:${appname} | jq -r ".resources[0].entity.service_bindings_url" | xargs -L1 cf curl | jq -r ".resources[].entity.credentials"

FAQ

I'm getting the following error message, although the submitted credentials are correct:

Attempt to connect with invalid server parameter, possibly someone is trying to hack your system

Try closing your HTTP session (clear your cookies or use a private browsing window) to flush your PHP session. It might be your previous attempts to log in are interferring.