Zum Inhalt springen

Forum

PHPWelt.net Blog - Ein weiteres tolles WordPress-Blog


fsockopen error 22 unable to connect / invalid argument

Wenn folgender Code:

<?php
$fp = fsockopen('localhost', 80, $errno, $errstr);
if (!$fp) {
  print("ERROR Number: ".$errno. '<br>Error String: '. $errstr);
} else {
  echo 'fsockopen() ok';
  fclose($fp);
}
?>

ausgibt:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:80 (Invalid argument) in /(…)/fsocktest.php on line 3
ERROR Number: 22
Error String: Invalid argument

dann muss in die /etc/network/interfaces.template folgendes:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
broadcast 127.255.255.255
up ip route replace 127.0.0.0/8 dev lo

danach reboot.


really static – wordpressplugin

If you got any problems or ideas with the “really static” plugin please post them at the comments! This Wordpressblog actuell uses this Plugin :-)

Status what works (testet):

create/delete Comments

create new blog entrys