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 8208273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:17:02+00:00 2026-06-07T09:17:02+00:00

First steps with Shopify here… I’m running PHP 5.4 and apache 2.2 on a

  • 0

First steps with Shopify here…

I’m running PHP 5.4 and apache 2.2 on a windows 7 machine with cURL 7.24. I am trying to follow along with this Sample App (https://github.com/cmcdonaldca/ohShopify-Sample-App) which uses the ohShopify PHP adapter but…

I’m getting the “SSL certificate problem, verify that the CA cert is OK” error after I allow the app access to the shop (which is on https://xxxxxx.myshopify.com). This problem is mentioned in the PHP API FAQ – Q2 (http://wiki.shopify.com/PHP_API_FAQ) with a possible solution. But I don’t understand where to “set USE_SSL_PEM to true in your configuration”. What configuration does this mean? PHP.ini ? CURLOPT_ ? Just define it in the php code? I’ve tried it in the php code in the config_lib.php file that is part of the Sample App like so:

define('USE_SSL_PEM',true);

but that doesn’t work.. and a search through the Sample App files reveals that nothing uses it… so I’ve got to be in the wrong place.

The second part in the FAQ is to define ‘CA_FILE’ in the .php code. I’m okay with that, I think, as I have exported the myshopify.com certificate and it seems valid. I converted it from .cer to .pem using:

openssl x509 -inform DES -in ie_shopify.cer -out shopify.pem -text

And then in the config_lib.php file:

define('CA_FILE', getcwd() . '\\shopify.pem');

I have confirmed that CA_FILE does point correctly to the file with an absolute path.

I’ve also tried what is suggested here (http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/) by setting CURLOPT_CAINFO in the ohShopify curlSetopts() function that is being called but with the same result.

And (as mentioned) I found out how to convert .cer to .pem from here (http://curl.haxx.se/docs/sslcerts.html)

Thanks,

Neil

UPDATE: solved! Instead of trusting the .pem file that I had first extracted using Internet Explorer as a .cer file and then coverted to a .pem file using openssl, I went to:

curl.haxx.se/docs/caextract.html 

…and grabbed the Mozilla CA certificate bundle – this is already in .pem format. I placed the cacert.pem file in the same directory as my other one and updated the CURLOPT_CAINFO line in the curlSetopts() function (I added this line previously in shopify.php). As before, I pointed directly at the file:

curl_setopt($ch, CURLOPT_CAINFO, 'D:/apache/htdocs/cacert.pem');

And it works. Moving on.

UPDATE 2: just to clarify, since I originally looked for the solution in the PHP API FAQ for Shopify (mentioned above) … I did not need to set the USE_SSL_PEM value (wherever it belongs) or to add the define CA_FILE code. The advice about CURLOPT_CAINFO from the unitstep.net blog was correct.

  • 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-07T09:17:04+00:00Added an answer on June 7, 2026 at 9:17 am

    I found a solution to my problem: unsurprisingly, the .pem file was incorrect – just as the error message indicated. I replaced it completely it with the Mozilla CA certificate bundle from

    http://curl.haxx.se/docs/caextract.html 
    

    Then in the shopify.php file I added the following line to the curlSetopts() function using an absolute path to point directly to the downloaded .pem file:

    curl_setopt($ch, CURLOPT_CAINFO, 'D:/apache/htdocs/cacert.pem');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First steps in FreeBSD: trying to run my installation script. Fast help needed: #
What are first steps creating a loadable DLL module extension for PHP to create
i'm moving my first steps into Django and i'm tryin' to follow the tutorial
I'm a C# developer taking my first steps in Windows Mobile development. I've installed
I've just started with PBE. Now trying to follow few first tutorials. Have problem
I´m trying to do my first steps with GWT/GIN. I´ve downloaded the hellomvp example
I'm currently trying to take my first steps with Hibernate, but unfortunately I don't
I am taking my first steps in XML-schema land, using XSD, and I'm trying
I am taking my first steps with Apache Wicket and ran into the following
I'm trying to implement something quite simple but I'm on my first steps in

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.