Php & Linux & Postgresql : install Postgres extension for php in linux command

Trabla: install PostgreSQL extension for php in linux command

Solving:

1. Install php5-pgsql extension
sudo apt-get install php5-pgsql 

2. Find php.ini file location
php -i  | grep php.ini 

3. Edit php.ini file - add 
extension=php_pgsql.so  
and save file
sudo pico php.ini  

4. Restart apache service
sudo service apache2 restart
 

No comments:

Post a Comment