OT/FOAK: Any PHP gurus in the house?

Discussion in 'UK Motorcycles' started by Rudy Lacchin, May 8, 2010.

  1. Rudy Lacchin

    Rudy Lacchin Guest

    Hi Chaps,

    I'm trying to connect to a secure server with PHP using the cURL library but
    the curl_exec() just hangs. The URL is correct because I can browse to it.
    The same code connects to an HTTP: address okay.

    I've tried installing a security certificate locally and setting CAINFO, and
    I've tried various values for VERIFYPEER and VERIFYHOST but it always hangs
    trying to connect to an HTTPS: address (mine, Yahoo, Google, etc). Googling
    the problem has provided a number of options, none of which appears to make
    any difference.

    Anyone managed to do this? Your advice and/or suggestions are welcomed!
     
    Rudy Lacchin, May 8, 2010
    #1
    1. Advertisements

  2. Rudy Lacchin

    Andrew998 Guest

    Not something I've done but it could be a base directory issue. Does the
    secure server rewrite the base name. If so you may need to have a rewrite
    base command in your .htaccess to ensure it finds it e.g.:

    <IfModule mod_ssl.c>
    Rewrite Base /domain.com/directory
    </IfModule>
    <IfModule !mod_ssl.c>
    RewriteBase /directory
    </IfModule>

    Of course I may be talking rubbish!
     
    Andrew998, May 8, 2010
    #2
    1. Advertisements

  3. Rudy Lacchin

    Rudy Lacchin Guest

    Even if it's rubish, it sounds good! Rewritebase is a new one on me but I
    shall Googlify it and then ask the company that question.

    Thanks!
     
    Rudy Lacchin, May 9, 2010
    #3
  4. Rudy Lacchin

    TD Guest

    What if you forget about PHP and use curl from the command line. Does that
    work?
     
    TD, May 9, 2010
    #4
  5. Rudy Lacchin

    Rudy Lacchin Guest

    O blimi, it's my freebie Web host (gofreeserve.com) - I don't suppose they'd
    let me have one of those. Thanks, I hadn't thought of that: I do know
    someone with a PHP box so I could ask him to try it from the command line
    and then if it works, maybe he'd let me test my script from there too.

    In over my head again!
     
    Rudy Lacchin, May 10, 2010
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.