Jump to content

Archived

This topic is now archived and is closed to further replies.

lordphate

Probelm with sockets?

Recommended Posts

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)
[code=php:0]                $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)) {[/code]


Here's next.php(line 37 +44)
[code=php:0]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';[/code]
Thanks in advance :D

Share this post


Link to post
Share on other sites
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 =/

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.