CURL ERRORS When Setting Protection

Discussion in 'Setting-up protection' started by chimera00, Jan 3, 2010.

  1. chimera00

    chimera00 New Member

    Joined:
    Jan 3, 2010
    Messages:
    2
    Please help- I'm trying out the free trial version and when trying to set up protection under Manage Products in the Admin CP, the browser shows busy until finally timing out and then an error gets generated in the log file:

    /amember/admin/protect.php?action=add 10.0.1.5 CURL ERROR: (7) - couldn't connect to host
  2. karlpalachuk

    karlpalachuk New Member

    Joined:
    Jul 22, 2008
    Messages:
    14
    Hello,

    Going to need a little more information on the product/protection you're using cause it sounds like the settings might be giving you some problems.
  3. maccast

    maccast New Member

    Joined:
    Mar 6, 2010
    Messages:
    22
    I'm getting this same error and there is no blocking on my firewall. Could there be another reason for this issue? When i ran the Tester I did get a the following PHP warning:

    Code:
    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/bin/curl) is not within the allowed path(s): (/var/www/vhosts/[mysite]/subdomains/member/httpdocs:/tmp) in /var/www/vhosts/[mysite]/subdomains/member/httpdocs/tester.php on line 165
    I figured it was OK, since it reported it could use the curl PHP extension which was installed, instead of the binary.
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    there is no curl support in php and standalone curl is not available because of hosting restrictions.
    So, contact hosting support and ask to recompile php and add cUrl with SSL support.
  5. maccast

    maccast New Member

    Joined:
    Mar 6, 2010
    Messages:
    22
  6. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    It found standalone curl, but it can't be used because of open_basedir restrictions in php on your server.
  7. maccast

    maccast New Member

    Joined:
    Mar 6, 2010
    Messages:
    22
    [​IMG]

    I thought that also and it was the case, but I worked with my hosting provider to remove all open_basedir restrictions (see above). Even after turning them off I continue to have the CURL issue.
  8. maccast

    maccast New Member

    Joined:
    Mar 6, 2010
    Messages:
    22
    Is there any other test I can run on my server to confirm that the kind of CURL access required by aMember is up and running. I'm happy to keep going back to my hosting provider and having them change configuration settings, but I need to give them some direction and at the moment I don't know what to tell them. I spent almost 2 hours on the phone with them troubleshooting the CURL and open_basedir issue. As a matter of fact, we were getting an open_basedir WARNING in PHP for the tester.php script until we changed the setting in the screenshot above. That WARNING went away, as you can see, but the issue in the admin is persisting. I tried removing aMember and re-installing it after we fixed the open_basedir setting, but that didn't make a difference.

    What's strange is how the error manifests itself. In the admin when I click the 'Protect Another Folder' link from the 'Protect Folders' section it attempts to load but gets stuck loading and never times out. I have let it run for over 30 minutes and nothing. This occurs in the latest versions of Safari and Firefox.
  9. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Can you contact me in helpdesk and provide access info?
  10. maccast

    maccast New Member

    Joined:
    Mar 6, 2010
    Messages:
    22
    I have set up a ticket on the helpdesk.

Share This Page