Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Try to user port 5222

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

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant