Title: [Plugin: G3Client] Line 68
Last modified: August 19, 2016

---

# [Plugin: G3Client] Line 68

 *  Resolved [cheperico](https://wordpress.org/support/users/cheperico/)
 * (@cheperico)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/)
 * 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!
 * [http://wordpress.org/extend/plugins/g3client/](http://wordpress.org/extend/plugins/g3client/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [arkgroup](https://wordpress.org/support/users/arkgroup/)
 * (@arkgroup)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957274)
 * 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](https://wordpress.org/support/users/cheperico/)
 * (@cheperico)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957382)
 * 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@http://localhost/temp/wordpress/gallery3/index.php/rest
 * I’ve also tried G3Client in a non local host ([http://memoriabarrial.chela.org.ar](http://memoriabarrial.chela.org.ar);
   Gallery3 @ [http://memoriabarrial.chela.org.ar/gallery3/index.php/](http://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](https://wordpress.org/support/users/fstoffel/)
 * (@fstoffel)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957441)
 * 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
    `http://localhost/temp/wordpress/
   gallery3/index.php/rest/`. Don’t miss the trailing slash!
 *  Thread Starter [cheperico](https://wordpress.org/support/users/cheperico/)
 * (@cheperico)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957532)
 * 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](https://wordpress.org/support/users/fstoffel/)
 * (@fstoffel)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957535)
 * Hi,
 * just send the file to fstoffel AT gmail.com – and thank you for your efforts!
 *  Thread Starter [cheperico](https://wordpress.org/support/users/cheperico/)
 * (@cheperico)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957603)
 * Fstoffel, do you got the translation I sent you?
 *  Plugin Author [fstoffel](https://wordpress.org/support/users/fstoffel/)
 * (@fstoffel)
 * [15 years ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957637)
 * 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
 *  [thowden](https://wordpress.org/support/users/thowden/)
 * (@thowden)
 * [15 years ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957641)
 * 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
    `http://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](http://codex.gallery2.org/Gallery3:API:REST#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](http://www.heiv.fr/projets/plugin-wordpress-gallery-3/)
   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
 *  [thowden](https://wordpress.org/support/users/thowden/)
 * (@thowden)
 * [15 years ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957642)
 * 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 http://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….
 *  [thowden](https://wordpress.org/support/users/thowden/)
 * (@thowden)
 * [15 years ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957643)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/g3client.svg)
 * [G3Client](https://wordpress.org/plugins/g3client/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/g3client/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/g3client/)
 * [Active Topics](https://wordpress.org/support/plugin/g3client/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/g3client/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/g3client/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [thowden](https://wordpress.org/support/users/thowden/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/plugin-g3client-line-68/#post-1957643)
 * Status: resolved