Error connecting to Vertica database via pdo

I am getting a problem connecting Vertica database from php using pdo which is throwing me an error.

[unixODBC] [Driver Manager] Data source name not found and no default driver specified "SQLSTATE SQLSTATE [IM002]

My connection string looks like this: -

$conn = new PDO('odbc:DRIVER={SOURCENAME};Server=localhost;Database=dashboard', "yogesh", "");

      

The same dsn works with the isql utility, but not with pdo.

+3


source to share


2 answers


Most likely it looks for the ini files in the wrong place, does strace in the php file and sees if it tries to access the ini files from the correct path



0


source


You tried to change

DRIVER={SOURCENAME};

      

to



Driver=Vertica

      

?

0


source







All Articles