I am using PHP and Postgres. I also downloaded homebrew.
I dumped the database into a txt file and uploaded my working code from school to github.
After importing the database onto my own machine and running postgres/psql and am running into this error when trying to access localhost:8000
"Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Users/Geoff/Documents/restaurant/src/Restaurant.php:3 Stack trace: #0 /Users/Geoff/Documents/restaurant/src/Restaurant.php(3): PDO->__construct('pgsql:host=loca...') #1 /Users/Geoff/Documents/restaurant/app/app.php(3): require_once('/Users/Geoff/Do...') #2 /Users/Geoff/Documents/restaurant/web/index.php(2): require_once('/Users/Geoff/Do...') #3 {main} thrown in /Users/Geoff/Documents/restaurant/src/Restaurant.php on line 3"
This is what I get from 'brew doctor'
"Uncaught exception 'Warning: /usr/bin occurs before /usr/local/bin This means that system-provided programs will be used instead of those provided by Homebrew. The following tools exist at both paths:
composer
phar
phar.phar
php
php-config
phpize
Consider setting your PATH so that /usr/local/bin occurs before /usr/bin. Here is a one-liner: echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
Warning: Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile"
I have tried changing the export path to multiple places.
This is the error when I type in postgres to the terminal.
"postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA environment variable."
I am fairly new to this so if you need any more information let me know.
Thanks.