0

We need to implement facebook login on our website.The latest facebook sdk supports only php 5.4 or greater.We are running 5.3.Tried using old versions of facebook sdk but running in to errors all the time.Any possible solutions other than upgrading to php 5.4 ?

The problem is, latest PHP SDK requires PHP 5.4 or greater. but I am not able to upgrade my existing PHP version 5.3 to 5.4 (my application code is not compatible with PHP 5.4)

I tried this but not solved my problem. Are there any other older version of Facebook PHP SDK that I could use, that can work with graph API v2.0 or later and still compatible with PHP 5.3?

Tijo Titus
  • 143
  • 1
  • 8
  • 1
    You are kidding? PHP 5.3 have not been supported with security updates for the last 3 years. http://php.net/supported-versions.php . Even PHP 5.4 and 5.5 are no longer supported – WizKid Jun 07 '17 at 04:11
  • https://stackoverflow.com/questions/28578724/which-facebook-sdk-to-use-with-php-5-3 CHECK THIS.. – RïshïKêsh Kümar Jun 07 '17 at 04:15
  • 1
    Possible duplicate of [Which Facebook SDK to use with PHP 5.3?](https://stackoverflow.com/questions/28578724/which-facebook-sdk-to-use-with-php-5-3) – RïshïKêsh Kümar Jun 07 '17 at 04:19
  • @RïshïKêshKümar i tried this but not working – Tijo Titus Jun 07 '17 at 04:36
  • 2
    You would be endangering the security and privacy of all users of your site by using such an old, unsupported PHP version. The only sensible thing to do here is getting your PHP up to date first. – CBroe Jun 07 '17 at 08:04

1 Answers1

-2

Graph API 2.0 is not more work because it's unavailable as of August 7, 2016:

Check this: https://developers.facebook.com/docs/apps/changelog

So, you have to update your PHP version to 5.4 or latest 7.0/7.1 And Then you can used Graph API version v2.3 to v2.9, and then follow below steps:

Login with Facebook using PHP 5.6 and latest

Pre - Requirements

  1. PHP version should be 5.6 or greater (7.0/1).
  2. The mbstring extension should be enabled.

Steps : https://www.codexworld.com/login-with-facebook-using-php/

Or

Steps : http://www.krizna.com/demo/login-with-facebook-using-php/

NOTE : Which type of code you did in application, which is not compatible with PHP 5.4 or greater? Can you update your question with that code.


Follow the following steps to upgrade your PHP version from 5.3 to 5.4/5.6

We can access the new PHP (php5.4 /php5.6) and old php (php5.x). Both are easily accessible.

Just to need to change the PHP version like below:

  1. Download PHP5.4 From http://windows.php.net/download/#php-5.4 (Download Thread Safe) or download PHP5.6 from http://windows.php.net/download/#php-5.6 (download thread safe)

  2. Go to PHP folder location (i.e C:\wamp\bin\php)

  3. Create a new folder with name php5.4.42. or php5.6.30

  4. Extract the download files and save in C:\wamp\bin\php\php5.4.42. or C:\wamp\bin\php\php5.6.30.

  5. Copy the following files from your old PHP directory to your new PHP directory ().

    php.ini
    phpForApache.ini
    wampserver.conf`
    
  6. Open new copied php.ini file.

  7. Update the extension_dir path in file.

  8. Open new phpForApache.ini file.

  9. Update the extension_dir path in file

  10. Reboot your system.

  11. Start wamp Server

  12. Go to wampserver =>PHP=>Version=>PHP 5.4.42 or PHP 5.6.30`

  13. Now running PHP5.4.42 or PHP5.6.30 or PHP7.0/1

enter image description here

Note: you might need to re-enable the PHP extension like CURL, Openssl etc

halfer
  • 19,824
  • 17
  • 99
  • 186
RïshïKêsh Kümar
  • 4,734
  • 1
  • 24
  • 36
  • php sdk not found – Tijo Titus Jun 07 '17 at 04:37
  • Why are you linking to a 6 year old article? Do you really think it will still work? – WizKid Jun 07 '17 at 05:11
  • @WizKid its, depend to #Tijo_titus.. Which Version he want to update .. i just show the steps.. for update – RïshïKêsh Kümar Jun 07 '17 at 06:09
  • @WizKid How do you know ... and if you have any ans then plzz update, without commenting in any one given ans., its help to other. – RïshïKêsh Kümar Jun 07 '17 at 16:58
  • Because http://php.net/supported-versions.php say that 5.3, 5.4 and 5.5 will not get anymore security updates. And you are not helping if you telling them to upgrade to a version that easily will get someone hacked – WizKid Jun 07 '17 at 17:53
  • @WizKid What about 7.0 and 7.1 ... and my point . its need to update his php version to implement facebook login ..graph api.. ( its not for particular version .. ) got it.. and as i said you have the better ans then post here ., without doing unwanted comment on my ans here . so its can help ..for any one .. – RïshïKêsh Kümar Jun 07 '17 at 18:06