Laravel 5 with Postgres SQL

前端 未结 7 1452
深忆病人
深忆病人 2020-12-31 02:56

I’m working on Laravel 5 with postgres as database. I’ve configured postgres 9.4 and pgAdmin III and these are working normally. When I try to run migrate it is giving me e

7条回答
  •  一整个雨季
    2020-12-31 03:18

    Run this command to easily uncomment the lines extension=pdo_pgsql.so and extension=pgsql.so from php.ini

    sed -ri -e 's!;extension=pdo_pgsql!extension=pdo_pgsql!' $PHP_INI_DIR/php.ini
    
    sed -ri -e 's!;extension=pgsql!extension=pgsql!' $PHP_INI_DIR/php.ini
    

    If you do not have the drivers already installed, or it gives error like unable to load dynamic library PGSQL run this:

    apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pgsql pdo_pgsql
    

    This will install the pgsql and pdo_pgsql drivers.

提交回复
热议问题