PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, February 21, 2022

[FIXED] Error 500 when including/requiring src/facebook.php from Facebook PHP SDK

 February 21, 2022     facebook-php-sdk, php     No comments   

Issue

I'm working to implement a Facebook login for my website. I have limited knowledge of php debugging so I'm more or less looking for a good approach to debug this.

As soon as I include (or require) the facebook.php file, with no other SDK interaction, Apache will 500 my PHP script.

include('fb-php-sdk/src/facebook.php');

fb-php-sdk is a directory within the directory that contains our PHP script (also the document root)


Server log:

[Tue Nov 15 23:18:16 2011] [error] [client 192.168.1.110] PHP Fatal error: Uncaught exception 'Exception' with message 'Facebook needs the CURL PHP extension.'

in /var/www/fb-php-sdk/src/base_facebook.php:19\nStack trace:

#0 /var/www/fb-php-sdk/src/facebook.php(18): require_once()
#1 /var/www/index.php(13): include('/var/www/fb-php...')
#2 {main} thrown in /var/www/fb-php-sdk/src/base_facebook.php on line 19 

From /var/log/apache2/error.log 

Solution

Install CURL =)

Command:

sudo apt-get install php5-curl


Answered By - Matt Malesky
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing