I am using latest base_facebook.php https://github.com/facebook/facebook-php-sdk/blob/master/src/base_facebook.php in order to authenticate the user to my web application via facebook.
Everything was working fine until today. I am getting suddenly a message in my web application like this
Fatal error: Uncaught CurlException: 7: Failed to connect to
2a03:2880:10:6f01:face:b00c:0:8: Network is unreachable thrown in
/var/www/pygmaxia2.gr/templates/pygmaxia2gr/base_facebook.php on line
977
Yesterday I was working normally and today all day long with no problem. The problem seemed to apear when I deleted a folder that I didn't need and was totally irrelevant with the file. When I do ctrl F5 for refresh with firefox, the message disappears and everything seems to work. But after a while It appears again just by clicking around in the page.
I have seen many have this problem but in my case there is no solution yet. The problem appears and disappears by itself without something visible causing it. I also need to mention that I am on a ubuntu 12.04 system and today I did an update. Do you think that it would disrupt the ipv6 related files? But still why is it going away periodically and then reappearing again? Also there is no firewall in my System.
Thank you
It seems that Facebook is down now in several country for more than an hour.... Just wait !
I'm having the exact same problem at the very moment, and it seems to me I can't connect to developers.facebook.com altogether.
Set Proxy To Connect Facebook.com
## Find Code In base_facebook.php ##
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
);
And Add option
public static $CURL_OPTS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
CURLOPT_USERAGENT => 'facebook-php-3.2',
CURLOPT_PROXY => '199.200.120.140:8089',
);
I encountered a similar curl exception since it was attempting to use IPv6 but was unable to.
Could get it working after I forced curl to use IPv4 via curl_setopt(). Followed the suggestion in this link - http://www.tech-and-dev.com/2012/07/how-to-fix-facebook-connect-error.html
Related
I have a weird error when trying to call the TYPO3 11 backend login page.
I updated from TYPO3 10 and can't login anymore.
I already removed all of my custom extensions, but the error persists and I can't make out where it comes from or why.
It seems to crash when reaching the first f:form.hidden field of the default login Fluid template.
As this is an obvious issue that probably would have got caught by core devs, I am pretty sure that this is correlated to a configuration of my instance, but as I said, this is to weird of an issue for me and I have no idea where to dig for the issue.
This is error message:
I can provide the whole stacktrace if needed.
Did you update your .htaccess file with the new rules for the TYPO3 backend? You can find a sample file in the the Resources folder of install tool extension: typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess
And I assume that you cleared all caches in the install tool and did a composer dump-autoload.
I discovered the source of this issue.
I had the following configuration automatically generated in my LocalConfiguration.php.
'SC_OPTIONS' => [
'GLOBAL' => [
'softRefParser' => [
'email' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'ext_fileref' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'notify' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'substitute' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'typolink' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'typolink_tag' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
'url' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
],
],
...
This caused the above error message. After removing this part from my configuration, the system lets me login and works flawlessly.
I installed logstash 5.5.2 in our windows server and I would like to send an email alert when I identify some sentences.
My output section is the following:
output {
tcp {
host => "host.com"
port => 1234
codec => "json_lines"
}
if "The message was Server with id " in [log_message] {
email {
to => "<myName#company.com>"
from => "<otherName#company.com>"
subject => "Issue appearance"
body => "The input is: %{incident}"
domain => "smtp.intra.company.com"
port => 25
#via => "smtp"
}
}
}
During my debug I got the following messages:
[2017-09-11T13:19:39,181][ERROR][logstash.plugins.registry] Problems loading a plugin with {:type=>"output", :name=>"email", :path=>"logstash/outputs/email", :error_message=>"NameError", :error_class=>NameError
[2017-09-11T13:19:39,186][DEBUG][logstash.plugins.registry] Problems loading the plugin with {:type=>"output", :name=>"email"}
[2017-09-11T13:19:39,195][ERROR][logstash.agent ] Cannot create pipeline {:reason=>"Couldn't find any output plugin named 'email'. Are you sure this is correct? Trying to load the email output plugin resulted in this error: Problems loading the requested plugin named email of type output.
Which I guess says that I don't have the email plugin installed.
Can someone suggest a way to fix this?
Using another solution is not an option, just in case that someone suggests it.
Thanks and regards,
Fotis
I tried to follow the instructions in the official documentation
But the option of creating an offline plugin pack didn't work.
So what I did, was to create a running logstash instance on my client, run the command to install the output-email plugin logstash-plugin install logstash-output-email and afterwards I copied this instance on my server(which had no internet access).
I am trying to create a persistent gateway connection using Net::OpenSSH::Gateway. Below is the code snippet I am using for the same.
my %proxy_opts = (
host => $host,
port=>$port,
password=>$password,
user=>$user ,
scheme=>"ssh",
ssh_cmd => '/usr/bin/ssh',
master_opts =>
[ -o=>"StrictHostKeyChecking=no",
-o=>"TCPKeepAlive=no",
-o=>"ServerAliveInterval=30",
-o=>"ServerAliveCountMax=90",
-o=>"ControlPath=/tmp/ssh-master-%h_%p_%r",
-o=>"ControlPersist=yes"
]
);
my %gateway_settings = ( proxies=>[ {%proxy_opts} ]);
my $gateway = Net::OpenSSH::Gateway->find_gateway(%gateway_settings, errors=>$errors);
I get the error below. But if I remove the option ControlPath and ControlPersist the entire thing works fine.
[ERROR ] unable to establish master SSH connection: bad ssh master at
/root/.libnet-openssh-perl/spangeni-j1.zscaler.-31930-744378, socket
owned by pid 31933 (pid 31931 expected)
I think it's a bug in the module. The module Net::OpenSSH::Gateway doesn't exist on CPAN, and the author already said that:
I have not published it on CPAN yet because, even it is already
functional, I have found some problems with its internal architecture
that I want to solve first. -Source
And also if you see the documentation of Net::OpenSSH you'll see that gateway is an experimental feature.
BTW what version of OpenSSH are you using? ControlPersist requires OpenSSH 5.6 or newer.
If you have tunnels enabled on the gateway machine, you don't need to use Net::OpenSSH::Gateway at all.
my $ssh_g=Net::OpenSSH->new($gateway);
my $proxy_command=$ssh_g->make_remote_command({tunnel => 1}, $host, 22);
my $ssh=Net::OpenSSH->new($host,
master_opts => [-o => "ProxyCommand=$proxy_command"]);
When trying to install PEAR by running go-pear.php (from the root of a cPanel GoDaddy hosted account), I get the following error:
Starting installation ... Loading zlib: ok
Bootstrapping Installer...................
Bootstrapping PEAR5.php............(remote) ok
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) ok
Bootstrapping Console/Getopt.php............(remote) ok
Fatal error: Class 'PEAR' not found in /home/alessio1/public_html/go-pear.php on line 697
line 697 is the following: PEAR::setErrorHandling(PEAR_ERROR_DIE,
"\n%s\n");
The file go-pear.php was taken directly from http://pear.php.net/go-pear without any modification.
What am I doing wrong?
I had the same error, and managed to solve it replacing the links stored in $bootstrap_files to :
$bootstrap_files = array(
'PEAR5.php' => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR5.php',
'PEAR.php' => 'https://raw.githubusercontent.com/pear/pear-core/master/PEAR.php',
'Archive/Tar.php' => 'https://raw.githubusercontent.com/pear/Archive_Tar/master/Archive/Tar.php',
'Console/Getopt.php' => 'https://raw.githubusercontent.com/pear/Console_Getopt/master/Console/Getopt.php',
);
I also had this error and found that KevinD's fix didn't work for me, but was able to figure something out based on it. To solve the problem I replaced the line
'Console/Getopt.php' => 'https://raw.github.com/pear/Console_Getopt/trunk/Console/Getopt.php',
with
'Console/Getopt.php' => 'https://raw.githubusercontent.com/pear/Console_Getopt/trunk/Console/Getopt.php',
The install completed nearly instantly for me after this change.
Use the .phar file: http://pear.php.net/go-pear.phar
It should work better.
Pay attenction: Sometimes the problem is caused because of the blocking of fsocket() php function.
Server-to-server communication is sometimes used to commit abuses for example internet attacks.
Many free hosting companies block fsocket() function by default, and sometimes you have to authenticate yourself (providing information about you) to use this function.
Yesterday was fine, but today, suddenly, my web app report an error while accessing Facebook PHP API.
At first, the error was connection time out. So, I added the time in base_facebook.php, changed the variable
CURLOPT_CONNECTTIMEOUT => 10 into
CURLOPT_CONNECTTIMEOUT => 60
Now, my web app reports another error:
Fatal error: Uncaught CurlException: 7: couldn't connect to host thrown in xxx\src\base_facebook.php on line 972
Ah, I run my app on localhost in Windows (XAMPP 1.7.7).
For testing it, I also run the example codes from the newest facebook API in github.
I also have restarted my Apache server, and It still gives the same error.
This is probably a server configuration problem on your side.
Check whether the host has blocked the ports 80 and 443.