• Resolved cheperico

    (@cheperico)


    Hi!

    Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\TEMP\wordpress\wp-content\plugins\g3client\client.php on line 68

    REST is enabled.
    allow_guest_access is enabled too (changed value from 0 to 1)

    As you see, I’m running WordPress and Gallery in a localhost to try it.

    What to do next?

    Thanks!

    https://www.ads-software.com/extend/plugins/g3client/

Viewing 10 replies - 1 through 10 (of 10 total)
  • cheperico,

    Probably php_curl is not enabled. You need to activate it.

    Try these steps:
    – Open C:\xampp\apache\bin\php.ini
    – Remove the semi-colon in front of this line: extension=php_curl.dll
    – Restart Apache

    Thread Starter cheperico

    (@cheperico)

    Thanks a lot! That was the problem.

    Now, a second one. Again, a noob one:

    Could not connect to Gallery3: failed to connect to Gallery3 (http status code: 0)

    Rest API URL: user:pass@https://localhost/temp/wordpress/gallery3/index.php/rest

    I’ve also tried G3Client in a non local host (https://memoriabarrial.chela.org.ar; Gallery3 @ https://memoriabarrial.chela.org.ar/gallery3/index.php/) with the same issue. My Gallery has an empty folder and 4 silly images.

    Any suggestions (other than to hiring an expert or giving up to WordPress and Gallery)?

    Again, thanks a lot!

    Plugin Author fstoffel

    (@fstoffel)

    Hi,

    you only have to specify the “user:pass” stuff when you use http authentication (a password with username). Try to set the url to
    https://localhost/temp/wordpress/gallery3/index.php/rest/. Don’t miss the trailing slash!

    Thread Starter cheperico

    (@cheperico)

    Oh yeah!

    Thanks!

    PS: How do I send you a spanish translation? I’m missing a few lines to finish (for now is the only way I have to contribute).

    Plugin Author fstoffel

    (@fstoffel)

    Hi,

    just send the file to fstoffel AT gmail.com – and thank you for your efforts!

    Thread Starter cheperico

    (@cheperico)

    Fstoffel, do you got the translation I sent you?

    Plugin Author fstoffel

    (@fstoffel)

    Hi,

    I’ve just checked by inbox, there is no email from you (or an email containing an po/mo file as attachment). Can you try to send the mail again please?

    PS: sorry for the long delay

    I have the same error with connecting to menalto Gallery 3.

    Could not connect to Gallery3: failed to connect to Gallery3 (http status code: 0)

    The URL is correct as I can test it directly within Firefox
    https://devsite.mydomain/gallery/index.php/rest/

    I can access and get an XML response that appears complete if I try to access as per the test instructions from the Gallery Wiki on Browsing Rest

    I’ve used the Guest account (setting guest rest enable to 1) and I created another user called ‘rest’ and tried with that Rest Key as well.

    <digress>I am getting a CURL error in the log
    PHP Warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in absolute_path/wp-content/plugins/g3client/client.php on line 72

    But I think this is a separate issue. I can change the setting on line 72 from True to False and while that stops the CURL error there is no change in the ‘Could not connect’ message. I expect that this CURL function is only required for Gallery sites that are remote to the WP site but would appreciate a confirmation.</digress>

    I have also tried the Gallery 3 WordPress Plugin from Heiv but I get the same error. Which suggests that it is not a plugin issue as much as a server config issue, but where to look?

    Any help appreciated. I am using WP 3.1.2 Network config on Linux.

    cheers
    Tony

    Hi

    Ok, I think I have this fixed.

    cURL is installed and working, but due to an oversight in my dns setup my test box did not know the alias that I was using for the site.

    Testing cURL at the command line made it obvious.
    # curl -v https://devsites.mydomain/mysite/gallery/index.php
    results in

    * getaddrinfo(3) failed for devsites.mydomain:80
    * Couldn't resolve host 'devsites.mydomain'
    * Closing connection #0
    curl: (6) Couldn't resolve host 'devsites.mydomain'

    adding the correct host entry to the local server dns resolved this issue and provided the correct responses.
    Now for the next issue….

    Ok, finally working. The last piece of this puzzle was the open_basedir setting in my server. This restricts cURL
    PHP Warning: curl_setopt() [<a href='function.curl-setopt'>function.curl-setopt</a>]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in absolute_path/wp-content/plugins/g3client/client.php on line 72
    This was showing as an error in the G3Client settings page as
    Could not connect to Gallery3: Found (http status code: 302)
    I was able to modify the httpd.conf for Apache and that allows the cURL option to work for this plugin.
    Not sure what you would do without httpd access and restrictive practices of some host providers where open_basedir is not optional.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: G3Client] Line 68’ is closed to new replies.