Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1729304: SQLSTATE[08001] [240012] curl_easy_perform() failed. err: Problem with the SSL CA cert (path? access rights?), CA Cert file: Not Specified #400

Closed
alexTitakoff opened this issue Oct 9, 2024 · 3 comments
Assignees
Labels
question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team

Comments

@alexTitakoff
Copy link

Good afternoon!

1.Php versions 8.3
pdo - the latest version that comes from the repository.
2. OS: Docker container Linux.

A \certificate error occurs during the test connection.
The Docker container on localhost is used. To disable OCSP, use the insecure_mode parameter.

Example of debugging code.

`try {
$dbh = new \PDO("snowflake:account=XXXXXXX;warehouse=XXXXX;database=XXXXX;schema=XXXX;insecure_mode=true;", 'XXXXX', 'XXXXXX');
} catch (PDOException $e) {
trace_log($e->getMessage());
die($e->getMessage());
}

$sql = "SELECT * FROM DLD_LAND_REGISTRY LIMIT 10";
$sth = $dbh->query($sql);

while ($row = $sth->fetch(\PDO::FETCH_NUM)) {
echo $row;
return;
}`

The parameter is marked with. But the error still occurs

SQLSTATE[08001] [240012] curl_easy_perform() failed. err: Problem with the SSL CA cert (path? access rights?), CA Cert file: Not Specified

What could be the error? Thank you!

@github-actions github-actions bot changed the title SQLSTATE[08001] [240012] curl_easy_perform() failed. err: Problem with the SSL CA cert (path? access rights?), CA Cert file: Not Specified SNOW-1729304: SQLSTATE[08001] [240012] curl_easy_perform() failed. err: Problem with the SSL CA cert (path? access rights?), CA Cert file: Not Specified Oct 9, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added question Issue is a usage/other question rather than a bug status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage and removed bug labels Oct 9, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi ! can you please

  • make sure account=XXXX has the proper accountname, as either myorg-myaccount (regionless version) or the regioned version as mentioned in Account Identifiers. E.g. in AWS EU Frankfurt it's xy12345.eu-central-1, and not just xy12345 (it would go to AWS US West)

If you're unsure what your account identifier is, you can login to Snowsight GUI , after login look at the URL (https://app.snowflake.com/myorg/myaccount) and copy myorg/myaccount as myorg-myaccount (replacing the / with -)

  • if it still doesn't work, please set DEBUG level logs by configuring
pdo_snowflake.logdir=/tmp
pdo_snowflake.loglevel=TRACE"

in your .ini, reproduce th issue, collect logs from logdir and sharing them here. Don't forget to edit out the sensitive information.

Also make sure that pdo_snowflake.cacert points to the cacert.pem which came with the drier. E.g. /etc/php/8.2/cli/conf.d/cacert.pem

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Oct 9, 2024
@alexTitakoff
Copy link
Author

Thank you for the prompt response!

I apologize, I got a bit lost in the settings and guides for adapting to Docker. I missed the step for configuring cacert.pem.

"In the same directory that contains the PHP configuration files, create a config file named 20-pdo_snowflake.ini that contains the following settings (or in case using Configuration File (php.ini) Path:, add the following lines to php.ini):

pdo_snowflake.cacert=<path to PHP config directory>/cacert.pem
# pdo_snowflake.logdir=/tmp     # location of log directory
# pdo_snowflake.loglevel=DEBUG  # log level```

Everything is working now, thank you for pointing out that important detail!

@sfc-gh-dszmolka
Copy link
Contributor

good to hear your problem is resolved ;) thanks for the feedback!

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-information_needed Additional information is required from the reporter status-triage Issue is under initial triage labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Issue is a usage/other question rather than a bug status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants