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 for SOCKET_EWOULDBLOCK not defined #705

Closed
nicola883 opened this issue Jun 28, 2019 · 6 comments
Closed

Warning for SOCKET_EWOULDBLOCK not defined #705

nicola883 opened this issue Jun 28, 2019 · 6 comments

Comments

@nicola883
Copy link

Hi.
It seems that constant SOCKET_EWOULDBLOCK is never defined.
Therefore, a warning message is raised:
Warning: Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' (this will throw an Error in a future version of PHP) in /sun/server/composer-libs/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php on line 78

@lukebakken
Copy link
Collaborator

This is probably similar to #619 and I'm sure the fix is similar. It would be great to get a pull request to fix this. Thanks!

@ramunasd
Copy link
Member

ramunasd commented Jul 1, 2019

Hi @nicola883, are You sure sockets extension is enabled and You can connect to broker?
Can You share PHP and OS version?

@huiyonghkw
Copy link

huiyonghkw commented Jul 11, 2019

root@3bcfd2276a9a:/var/www/zhanye# php -v
PHP 7.2.19-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:16:55) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
root@3bcfd2276a9a:/var/www/zhanye# php -m|grep sockets
sockets
root@3bcfd2276a9a:/var/www/zhanye# php -m|grep bcmath
bcmath
root@3bcfd2276a9a:/var/www/zhanye#

i used laradock, but same problem with me

/var/www/zhanye/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Wire/IO/StreamIO.php


"Use of undefined constant SOCKET_EWOULDBLOCK - assumed 'SOCKET_EWOULDBLOCK' (this will throw an Error in a future version of PHP)"

@ramunasd
Copy link
Member

thanks @bravist, I see there is different script paths in issue body and your previous comment, maybe the reason is that sockets extension is not enabled only for web server?

@huiyonghkw
Copy link

thanks @bravist, I see there is different script paths in issue body and your previous comment, maybe the reason is that sockets extension is not enabled only for web server?

yes, you are right.

if run CLI mode, no problem. but only for web server.

so, how can i slove it?

@ramunasd
Copy link
Member

I see You use ubuntu so this tutorial should help
https://tecadmin.net/enable-disable-php-modules-ubuntu/

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

No branches or pull requests

4 participants