wordpress-heroku icon indicating copy to clipboard operation
wordpress-heroku copied to clipboard

Run using PHP internal server and remote DB?

Open OKNoah opened this issue 9 years ago • 1 comments

Is it possible to run this using foreman, thus using the environmental variables, and the DATABASE_URL variable locally? When I try this, I get the error Error establishing a database connection.

Here is how I'm doing it.

In my Procfile_dev file

web: php -S 127.0.0.1:80 -t ./

In my .env file:

AUTH_KEY=[ VALUE HERE ]
SECURE_AUTH_KEY=[ VALUE HERE ]
LOGGED_IN_KEY=[ VALUE HERE ]
NONCE_KEY=[ VALUE HERE ]
AUTH_SALT=[ VALUE HERE ]
SECURE_AUTH_SALT=[ VALUE HERE ]
LOGGED_IN_SALT=[ VALUE HERE ]
NONCE_SALT=[ VALUE HERE ]
DATABASE_URL=[ VALUE HERE ]
HEROKU_POSTGRESQL_BLUE_URL=[ VALUE HERE ]
AWS_ACCESS_KEY_ID=[ VALUE HERE ]
AWS_SECRET_ACCESS_KEY=[ VALUE HERE ]
SENDGRID_PASSWORD=[ VALUE HERE ]
SENDGRID_USERNAME=[ VALUE HERE ]

Then I run:

sudo foreman start -f Procfile_dev --env .env

I'm on OS X Yosemite using PHP 5.5 though Homebrew, with the php55-pdo-pgsql package installed.

OKNoah avatar Jun 12 '15 10:06 OKNoah