Permalink
Browse files

typo

  • Loading branch information...
1 parent 2eb02ad commit 7629c89648e655c717ec16c5745b0eeb725d58a4 @kch committed Oct 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 README.md
View
@@ -18,7 +18,7 @@ Push your clone to Heroku:
$ git push heroku master
-PHP apps don't get a database by default, so you have to aadd it manually:
+PHP apps don't get a database by default, so you have to add it manually:
$ heroku addons:add shared-database

2 comments on commit 7629c89

thank you so much :)

hi.. here is a simple change to work fine on heroku, production and locally:

function pg_connection_string_from_database_url() {
if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') {
return "user={my_user} password={my_password} host={my_host} dbname={my_database}";
} else {
extract(parse_url($_ENV["DATABASE_URL"]));
return "user=$user password=$pass host=$host dbname=" . substr($path, 1); # <- you may want to add sslmode=require there too
}
}

Please sign in to comment.