skmaingi / xmpphp

0 stars 0 forks source link

Warning: fclose() expects parameter 1 to be resource, null give nm/sites/www/XMPPHP/XML_Stream.php on line 244 #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello Admin..
Iam getting many errors frm when excuteing php..   
Warning: fclose() expects parameter 1 to be resource, null given in 
sites/www/XMPPHP/XML_Stream.php on line 144  
Please Help Me  ::::Linux Server 5.2 Php

Original issue reported on code.google.com by codergu...@gmail.com on 29 Dec 2012 at 11:15

GoogleCodeExporter commented 8 years ago
In the SMLStream.php file around line 411 you will see a call to 

fclose($this->socket);

Change the line to read:

if ($this->socket) {
  fclose($this->socket);
}

Sometimes, with previous errors, the socket is not defined. In those cases, you 
will see this error/warning and it will mask the real failure in noise. After 
testing it the socket is valid, you should not see this warning anymore.  Bow 
you can find the earlier error that caused the socket to be undefined. (most 
likely authentication)

Karwin

Original comment by kar...@gmail.com on 9 Sep 2013 at 4:34

GoogleCodeExporter commented 8 years ago
I think, you are using...wrong port number, in the connection setup 
constructor...

Original comment by paraswor...@gmail.com on 13 Sep 2013 at 7:07

GoogleCodeExporter commented 8 years ago
Try to user port 5222

Original comment by paraswor...@gmail.com on 13 Sep 2013 at 7:07

GoogleCodeExporter commented 8 years ago
My Port 5222 is Open and still i am getting the same error 
Warning: fclose() expects parameter 1 to be resource, null given in 
/home/easyplus/public_html/chat/XMPPHP/XMLStream.php on line 403

Please advice me how can i stop this warning 

Thanks in Advance

Original comment by ajitsa...@gmail.com on 3 Jul 2014 at 6:47

GoogleCodeExporter commented 8 years ago
Yes this is working fine and well 
Thanks a Lot for the Team.
Ajit Kujmar KV

Original comment by akhilasa...@gmail.com on 4 Jul 2014 at 7:06