MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.19k stars 21.33k forks source link

Warning: failed loading cafile stream- BaltimoreCyberTrustRoot.crt.pem #71034

Closed JigneshRawal closed 3 years ago

JigneshRawal commented 3 years ago

On Using the PHP code as mentioned in the Document and enabling the SSL i get the above error Warning: failed loading cafile stream. I have an Azure PaaS PHP web app (7.4) trying to connect to Azure PaaS Mysql WebApp (8.x).

I have exactly copy pasted the PHP sample and tried , so i dont think i am doing any mistake at the application code level .

Can you please let me know the possible solution ?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

savjani commented 3 years ago

Can you share your msqli_ssl_set string in the code? Have you download BaltimoreCyberTrustRoot certificate file in /var/www/html location?

JigneshRawal commented 3 years ago

mysqli_ssl_set($conn,NULL,NULL, "/site/wwwroot/Connections/DigiCertGlobalRootG2.crt.pem", NULL, NULL);

My location is different as mentioned above.

savjani commented 3 years ago

Are you connecting to single server or flexible server?

JigneshRawal commented 3 years ago

Single server.

savjani commented 3 years ago

The article on which you have commented is for configuring ssl to single server and for that you need to download BaltimoreCyberTrustroot certificate https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl

JigneshRawal commented 3 years ago

Yes i have tried with BaltimoreCyberTrustroot and it gives me the same error.

Also the doc says that the certificate will expire in Feb 21 and hence i tried with DigiCertGlobalRootG2 and none of these seems to work.

savjani commented 3 years ago

Can u use BaltimoreCyberTrustroot certificate and first connect using MySQL client. Does that work? Would you be able to open a support ticket from Azure portal and one of the support engineer can help assist you.

JigneshRawal commented 3 years ago

Yes i will be moving ahead in the direction of opening a support ticket in azure portal thanks.

AnuragSharma-MSFT commented 3 years ago

@savjani Thanks for providing all the necessary information.

@JigneshRawal Please let us know if you have created the support ticket and we can move ahead and close the thread.

savjani commented 3 years ago

Hi @JigneshRawal - Please share the case no with me so I can make sure I follow-up on the ticket while we can close this thread.

JigneshRawal commented 3 years ago

Hi i am a developer and the azure support access is with the Azure Admin team , hence it wont be possible for me to give you the case number. But they have informed me that they have raised a case with Azure Support.

I think we can close this case but in case if i get a solution then i wish to post it here so that someone who stumbles on the same issue can get the solution here.

savjani commented 3 years ago

thanks @JigneshRawal .. Good thought. I will let @AnuragSharma-MSFT to comment if you can post the solution here but feel free to email us at AskAzureDBforMySQL@service.microsoft.com if you are stuck or blocked.

AnuragSharma-MSFT commented 3 years ago

@JigneshRawal Thanks for confirming to close the issue, but please feel free to post the solution once you get things start working again. Its really encouraging and it would help others facing similar issues.