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
Related
I am currently using GMAIL less secure app method to send email from my website. Since it no longer works due to Google blocking the emails to be sent, I am now shifting to Oauth method.
I followed all the steps mentioned in the following article and was able to complete all the steps successfully except the last one.
https://github.com/PHPMailer/PHPMailer/wiki/Using-Gmail-with-XOAUTH2
In the last step when I try to visit the URL and select google as the provider it just displays:
[website] is currently unable to handle this request.
HTTP ERROR 500
Things I tried:
Deactivating all plugins
Increasing PHP memory limit
My website generally is not facing Error 500 problem. It displays this only while accessing the URL where the get_oauth_token.php resides on the website (as directed to do in the article)
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
After months of putting it off I am trying to update my code to use Version 3 of the YouTube Data API.
I am in China so I need to use a VPN to work on this code, but the servers are in Atlanta. The line of code that gives me grief is:
$this->youtubeService = new Google_YoutubeService($this->googleClient);
That actual Google Client creates fine I can print it to the screen. I have blown away the API on the server thinking something went wrong in the upload, the example code using Books runs, I've enable the API in my console, I put printf's on either side of my code and narrowed it down to this line, but all I know is
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (favouriteQuotationsMashup.php, line 0)
I can comment the line out to keep my code and my site running, but I am really not amused that I keep having to jump through hoops to get APIs to work again, YouTube is cool and all but it isn't vital to the function of my website, the only place I use it is in my quotation mashup. How do I figure out what is causing this error, especially if it is in Google's now giant beta PHP library?
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
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)