Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:35:12+00:00 2026-06-04T06:35:12+00:00

I have a Symfony2 project under Debian. What are the steps to change my

  • 0

I have a Symfony2 project under Debian. What are the steps to change my database to postgresql ?

Note: The question has been asked here, but it is with symfony 1.4, I believe.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:35:13+00:00Added an answer on June 4, 2026 at 6:35 am

    Install postgresql under debian:

    apt-get install postgresql postgresql-client
    apt-get install php5-pgsql
    adduser mypguser
    su - postgres
    psql
    CREATE USER mypguser WITH PASSWORD 'mypguserpass';
    CREATE DATABASE mypgdatabase;
    GRANT ALL PRIVILEGES ON DATABASE mypgdatabase to mypguser;
    \q
    

    In /etc/php5/apache2/php.ini, add: (this is in fact optional)

    extension=pdo.so
    extension=php_pdo_pgsql.so
    

    Change the symfony apps/config/paramters.ini file:

    [parameters]
        database_driver:    pdo_pgsql
        database_host:      localhost
        database_port:      null
        database_name:      mypgdatabase
        database_user:      mypguser
        database_password:  mypguserpass
    

    Relaod your project:

    php bin/vendors update
    php app/console assets:install web
    php app/console doctrine:schema:create
    php app/console doctrine:fixtures:load
    chmod 777 -R app/cache app/logs
    

    You’re done!

    References:

    Symfony documentation for configuring databases

    Postgresql installation under debian

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Symfony2 project with its own database, and now I want to
I have an object from inside a Symfony2 project. Here follows the code. namespace
When I update my Symfony2 project I always have to do this: root@xxx:/var/www/project# php
Problem: I have a symfony project with a database full of production data I
I have a regular class in my Symfony2 project: class RangeColumn extends Column{ //...
I have added the translator service for my Symfony2 project. I use it both
I have recently started setting up the security for my Symfony2 project. I opted
I use Doctrine2 as ORM in a Symfony2 project. I have article and tag
I have a question to the security features of Symfony2. I want to protect
I want basic theming support in my Symfony2 project, so I wanted to have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.