Facebook PHP sdk 500 Internal Server Error on windows server - php

I am trying to integrate Facebook php sdk with my application (build on YII framework) using yii-facebook-opengraph extension.
The problem arises once i am trying to authenticate to facebook. after authentication and redirects to the domain its throwing 500 internal server error.
Application hosted on windows server, PHP (5.2.17), Yii(1.1.14),parallel plesk(9.5).
The cause for 500 internal server is unknown. also checked the log but its of no help to trace the error.
Please help me to fix the issue.

The most recent version of Facebook's PHP SDK, version 4, requires PHP 5.4. Your question indicates that you're using an earlier version of PHP.

Related

Can't understand SocketJS Error

I'm currently developping a project with a Symfony API (version 3 with PHP 7.1) and a NodeJS Client with Angular 4.
Within the local environment, everything is working well, but when I try to deploy on the production server, I get the error "WDS Disconnected" and a connection error with sockjs.
I don't know where the error comes from.
Have you ever encountered this kind of error and have you got an idea on how to fix it ?
Thanks a lot.
caption of the error

PHP in windows 10

I installed every version of PHP on windows 10 via the web platform installer with IIS10 as the web server. A simple page using PHP 7.1 as follows
<?php
echo "Hello world";
returns back a [HTTP/1.1 500 Internal Server Error 19ms] message.
Any feedback as to what I could be missing.
Thanks.

Why does my twilio web application work in XAMPP but not in AZURE

I've created an application in php that sends texts out to people using the twilio api. It works perfectly in XAMPP but the php code doesn't run in Azure. Everytime I call it I get an error message saying "Failed to load resource: the server responded with a status of 500 (Internal Server Error)".
Is there a way I can solve this problem without having to create my own virtual server?
Usually, when we get 500 response, it means we get some errors on server scripts. And we can set the display_errors=On in PHP runtime on our Azure Web Apps for easy troubleshooting. Refer to https://azure.microsoft.com/en-in/documentation/articles/web-sites-php-configure/#how-to-change-the-built-in-php-configurations for details.
And you may check whether your application on Azure Web Apps has successfully installed the twilio lib. You can leverage composer to configure the sdk in composer.json, then when you deploy your application to Azure via Git, Azure service will install the dependencies in composer.json file automatically during the deployment task.
You can leverage require 'vendor/autoload.php' to load all the dependencies.
At the first time during the test, I got the following error:
Fatal error: Uncaught exception Services_Twilio_TinyHttpException with message SSL certificate problem...
So it may be the issue on your side too, you can add the certificate in PHP on Azure Web Apps, please refer to https://blogs.msdn.microsoft.com/azureossds/2015/06/12/verify-peer-certificate-from-php-curl-for-azure-apps/ for detailed steps.
Otherwise, you can simply edit TinyHttp.php in twilio lib:
add CURLOPT_SSL_VERIFYPEER => FALSE, at $opts array.
Refer to Twilio PHP - SSL certificate: self signed certificate in certificate chain for the same issue.
They have many possibles:
Your Azure running PHP in ISS Server, then you need convert your .htaccess file to web.config, simple, just go to website in IIS and on import your .htaccess file, IIS will convert your .htaccess in web.config.
Permissions on folder you are running.
PHP versions, check your PHP version on xampp and compare to PHP version on Azure. Your code can be compatible in your PHP Xampp but not in PHP Azure.
Extensions PHP, it is possible that your xampp has extensions for PHP enable that your Azure not are enable, like file_info, etc...

PDO Exception: The server requested authentication method unknown to the client

I have a running LARAVEL based website on a shared hosting (Business Plan) with Hostgator India. Ee decided to migrate it to a recently purchased dedicated server. The content transfer/migration was successful, however, when I try to LOGIN/REGISTER using the default laravel methods on the dedicated server I get following exception:
PDO Exception: The server requested authentication method unknown to the client
After, researching a lot on Google / StackOverflow I discovered that there could be a mismatch in the server mysql version. However, I am not able to understand how to get it fixed. I am currently using a PHP 5.5 (Also tried PHP 5.4 with no success). Downgrading it to PHP 5.3 would work, with its own sweet problems for "syntax errors" and requires quite a lot of the change in the code. The code works absolutely fine on the business plan and my local MAMP server. I am sure I am missing something very small here and would be really thankful if someone could point me in right direction.
Edit 1: MySql information on Server
Server type: MySQL
Server version: 5.5.37-cll - MySQL Community Server (GPL)

HTTP Error 500 on phpinfo.php

I just installed MySQL on Windows Server 2008 R2.
I followed the instructions on: [Install and Configure MySQL for PHP Applications on IIS7][1]
And when i was gonna check phpinfo.php, i get error 500. Here is a ScreenShot that i took when using RDP to our Windows 2008 R2 server. http://i.stack.imgur.com/hW7qG.png
I have no idea what causes this error. And i have absolutley no idea how to fix this.
Here is the error log that IIS made for today: http://s000.tinyupload.com/?file_id=11719906829973224437
i've searched around using google, and there was no solution for my problem.
I have PHP Manager, and it does not show any message that would indicate there is a problem with the PHP configuration.
Any idea how i can fix this, so that i can continue on developing the website for my company?

Categories