0

I have been connecting postgresql with codeigniter give error there is no connection and the db driver is invalid or not found what should i do ?

A Database Error Occurred
could not find driver

Filename: core/CodeIgniter.php

Line Number: 518

Be kind and suggest a solution.

Thanks.

2
  • 1
    Have you installed the PHP extension for postgres? Commented Oct 5, 2019 at 8:21
  • this is required i'll install the extension and revert back to you. thanks. Commented Oct 7, 2019 at 6:49

1 Answer 1

1

https://codeigniter.com/user_guide/database/configuration.html

check your Database.php file in config folder. add dns and other details. before that you must be ready with postgres installed on you server

    $db['default']['dsn'] = 'pgsql:host=localhost;port=5432;dbname=database_name';
Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the answer but my code is different from what you wrote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.