501 Errors on Facebook IFRAME - php

Im loading an iframe within a facebook app but I seem to be getting a 501 error response. I do not get this error response when navigating directly to the domain I am hosting on e.g
www.example.com/fbapp/
but when i go to
aps.facebook.com/fbapp
I get the error.
We have a valid SSL for our site and the issue from what I can tell is sporadic at best.
I would really just like to understand why it might be happening and any preventative measures I can take.

The request from Facebook to your app is made via a POST request when loaded from Facebook - make sure your code can handle that, and check your own server's error logs as this is where the 501 error is coming from, only your own logs will be able to tell you what the issue is

Related

Logging http error codes (500, 504) in telegram chat with bot

I have site that working with yii2 and nginx, send information from site pages to the chat in telegram with bot.
Sometimes site can't load page or have troubles with something else. The task is that bot need text to chat, have problem HTTP:CODE, I don't want to solve problems with loading pages, I talk about other.
On that moment bot can text if HTTP code error is 403, BUT, this method can't work with 500,504 error codes (Man who have big experience in this job, say, that isn't work, because php code will not run on these errors)
I can't give source code (closed repository) I didn't write this question if Google searching give results, only HTTP errors from telegram (account that send message in blacklist)
Thanks for help😤
UPD found how error 403 logging in this project https://www.yiiframework.com/doc/guide/2.0/en/runtime-logging and found same theme where text that error 500 logging in apache but in this project use nginx https://stackoverflow.com/questions/55023726/yii2-logging-500-errors-on-production/55062137

Google bots get 503 errors while indexing my website

While google (or any other robot) is crawling my website developed using Laravel, it gets 503 Server Unavailable error. I can visit my website without any problem and do not get any error: http://www.kurumyonetimsistemi.com
How can I fix this problem?
Edit:
503 error is because I am redirecting not found pages to a custom page. If I remove this redirect, robots get 500 Internal Server Error. But I can display my website on a browser without problem.
Well, after a while of searching, I have found the problem. I was getting the visitors browser language and stroing it as a cookie.
This process causes errors for robots. If I remove the code, the problem is solved.

Maps API using file_get_contents causes internal 500 error

I have been using the Maps API service for a month now. This morning I found that the service has stopped working. Any request to maps.googleapis.com causes my server to hang for a moment and then display the internal server 500 error.
At first I thought I was blocked / banned by google and there must be something I have overlooked with the t and c's but having looked further there are no notifications in my google api dev console.
If I make a request from another server using the same API key it works.
If I make a request directly in the url bar with the same API key it also works.
It only hangs and causes a 500 error for the domain maps.googleapis.com and not any other. I am guessing that Google has blocked my server IP but it seems odd that they would do this and my API key still works fine. If they had blocked me it wouldn't it be the whole API account?
Firstly, how do I know if I am blocked?
Secondly, why do I not get a error from google saying what the issue is?
Why does it cause my server to issue a 500 error? If my server is blocked it wouldn't just respond to say whatever the API problem is?
All seem very strange to me. It only started today. I am hitting the API with file_get_contents using php 5.1 on an apache server.
To clarify, the 500 error is on my server, I cannot see any response from the http request because it hangs and then spits out the 500 error.
And now after 3 hours of debugging it works for no explained reason. The only possibility that i can think of is that the hosting company has been doing maintenance and something they changed caused this. after waiting on hold for 20 minuts they disconnected but perhaps they looked into it behind the scenes for me. Pretty annoyed a whole morning waisted and although im happy it has resolved its still frustrating to not know what or why

Ionic/Angular $http.get returning Response for preflight has invalid HTTP status code 404

I am developing an application in IONIC. I am making a $http.get request in Angular JS and its giving me 404 error when I successfully login and trying to load the user profile using the token sent in the authentication header.
It produces error in chrome, although I enabled CORS. Please check the screenshot:
Now if I try the url in POSTMAN, everything is ok. See the screenshot below:
I am stuck with this error, can someone help me?
What Ionic says
There are two ways to solve the issue: The first, and easier, solution is to just allow all origins from your API endpoint. However, we can’t always control the endpoint we are accessing. What we need, then, is a request that does not specify an origin.
We can do this by using a proxy server. Let’s look how the Ionic CLI provides
Reference
What works but isn't completely good to use
A simple solution is just add a CORS plugin into your browser and everything will work.
Plugin Link
Proxy server
If you want a proxy server there is this tutorial:
Link

interesting facebook status code 500 error on linux server, PHP

index.html is working on facebook debug.
index.php is not working on facebook debug.
this site is reachable, but facebook is not reaching. what is the problem?
Though it works in the browser, when I try to load your site from the command-line using CURL, it responds with an 500 Internal Server Error and no page. It seems that your site blows up whenever the client doesn't send the Accept-Language header. This header is optional, so you probably shouldn't do that.
Your page is returning a 500 error to Facebook's crawler.
Also when I check it manually I get the same problem, as Jeremy reported.
Do you have any logic in your PHP which checks the user agent header and does different things on different user agents?
The Facebook crawler presents as
facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

Categories