-
Notifications
You must be signed in to change notification settings - Fork 0
Thierry Lam edited this page Nov 17, 2017
·
9 revisions
PHP 5.3.8 is installed by default on the Mac, PHP 5.3.6 source will be used to build pgsql.so
and pdo_pgsql.so
because of a build issue with 5.3.8.
- Download PHP 5.3.6
- Go to php-5.3.6/ext/pgsql
phpize
./configure --with-pgsql=/Library/PostgreSQL/9.1
make
sudo make install
- Download PHP 5.3.6
- Go to php-5.3.6/ext/pdo_pgsql
phpize
./configure --with-pdo_pgsql=/Library/PostgreSQL/9.1
make
sudo make install
The above libraries will be copied to /usr/lib/php/extensions/no-debug-non-zts-20090626
According to phpinfo()
, the default php.ini
on my mac is at /private/etc/php.ini
. Copy over /private/etc/php.ini.default
to /private/etc/php.ini
if it does not exist. Add the following lines to php.ini
:
extension=pgsql.so
extension=pdo_pgsql.so
Cake PHP depends on pdo_pgsql.so
, make sure the above were installed successfully.
Ensure your app/Config/database.php
has:
public $default = array(
'datasource' => 'Database/Postgres',
'persistent' => false,
'host' => 'localhost',
'port' => '5432',
'login' => 'postgres',
'password' => 'postgres',
'database' => 'gateau',
'prefix' => '',
);
On the mac, mysql.sock
is located at /tmp
. In /private/etc/php.ini
pdo_mysql.default_socket=/tmp/mysql.sock
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'mysql',
'password' => 'mysql',
'database' => 'gateau',
'prefix' => '',
);
-
Copy the key
xclip -sel clip < ~/.ssh/id_rsa.pub
-
DB Config
common/config/main-local.php
-
PHP Extensions
sudo apt-get install php7.0-mbstring sudo apt-get install php-xml sudo apt-get install php-curl
-
Run yii
php yii serve