× Joomla Facebook Connect support forum

Topic-icon Fatal error ?

Active Subscriptions:

None
13 years 1 month ago #7786 by freshcom
Fatal error ? was created by freshcom
hi i get a strange error after successfull instalation.. when i click on he main overview page of the component.

Fatal error: Call to undefined function curl_setopt_array() in /var/www/vhosts/freshcom.at/httpdocs/babysit_test/administrator/components/com_jfbconnect/assets/facebook-api/facebook.php on line 626

any help welcome :)

regards
Mike
The topic has been locked.
Support Specialist
13 years 1 month ago #7797 by alzander
Replied by alzander on topic Fatal error ?
First time we've heard of that, honestly. However, from a quick investigation, I'm willing to bet you're using a version of PHP over 5.0 and under 5.1.3. That function (curl_setopt_array) was introduced in 5.1.3.

There's 2 options that can fix this problem:
1) Upgrade to a newer version of PHP. Depending on your host or server configuration, this can either be extremely simple, or a horrible nightmare.
2) Add the following bit of code to the top of /administrator/components/com_jfbconnect/assets/facebook-api/facebook.php:
if (!function_exists('curl_setopt_array')) {
   function curl_setopt_array(&$ch, $curl_options)
   {
       foreach ($curl_options as $option => $value) {
           if (!curl_setopt($ch, $option, $value)) {
               return false;
           } 
       }
       return true;
   }
}
Just cut and paste that block at line 19, right after the if block that checks for json_decode. Hopefully, that's clear, but if not, let us know.

I'll likely add that snippet to the file so that future releases don't cause this issue for old(er) versions of PHP.

Please let us know if either of the above solutions help!
The topic has been locked.
Active Subscriptions:

None
13 years 1 month ago #7810 by freshcom
Replied by freshcom on topic Fatal error ?
Perfect!... Thank you you made my day ;) works like charm now!


regards
Mike
The topic has been locked.
Support Specialist
13 years 1 month ago #7811 by alzander
Replied by alzander on topic Fatal error ?
Great to hear. I added this to our tracker, so it will definitely be in the 3.2 release and you won't have to worry about it again. Thanks for pointing out the issue!

If you like JFBConnect or our support, please vote or review us on the Joomla Extension Directory:
extensions.joomla.org/extensions/social-...ook-integration/7215

Best of luck to you, and glad we could make your day! :)
Alex
The topic has been locked.
Support Specialist
13 years 1 week ago #8784 by mel
Replied by mel on topic Fatal error ?
Just wanted to point out that we just had a new release of JFBConnect 3.2 out tonight that should fix this issue. Give it a try and let us know if you have any issues with it.
The topic has been locked.