Jump to content


Photo

Probelm with sockets?


  • Please log in to reply
2 replies to this topic

#1 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 05 August 2006 - 12:23 AM

Warning: socket_read() unable to read from socket [104]: Connection reset by peer in /home/*****/public_html/library/whm.php on line 259

Warning: array_keys(): The first argument should be an array in /home/*****/public_html/order/next.php on line 37

Warning: array_key_exists(): The second argument should be either an array or an object in /home/*****/public_html/order/next.php on line 44
----------

Warning: socket_read() unable to read from socket [104]: Connection reset by peer in /home/*****/public_html/library/whm.php on line 259

Warning: array_key_exists(): The second argument should be either an array or an object in /home/*****/public_html/order/nobill_setup.php on line 183



Okay here's 259(WHM.PHP)
                $in = "GET $request HTTP/1.0\n";

                socket_write($socket,$in,strlen($in));

                $in = "Connection: close\n";

                socket_write($socket,$in,strlen($in));        

                $in = "Authorization: WHM $authstr\n\n\n";

                socket_write($socket,$in,strlen($in));        



                $inheader = 1;

                while(($buf = socket_read($socket, 512)) != false) {   <-----259

                  if (!$inheader) {

                          $data .= $buf;

                  }

                  if(preg_match("'\r\n\r\n$'s", $buf)) {


Here's next.php(line 37 +44)
if (empty($_SESSION[username])) {if (empty($_POST[STREETADDRESS])) $postcheck = Fail;}<--37

if (empty($_SESSION[username])) {if (empty($_POST[PHONE])) $postcheck = Fail; }

if (empty($_POST[DOMAIN])) $postcheck = Fail;

if (empty($_POST[EXTENSION])) $postcheck = Fail;

if (empty($_POST[USERNAME])) $postcheck = Fail;  <--44

if (empty($_POST[PASSWORD])) $postcheck = Fail;

if (empty($_POST[EMAIL])) $postcheck = Fail;

if ($postcheck == Fail) $reason = 'Error : You did not fill in all the required fields';
Thanks in advance :D

#2 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 05 August 2006 - 03:04 AM

Any thoughts

#3 CTM

CTM
  • Members
  • PipPip
  • Member
  • 15 posts

Posted 05 August 2006 - 04:03 AM

First off, you should put !== FALSE on line 259, that might be your error. Else, it's exactly as it says. It can't read from the socket =/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users