Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

Unable to set socket option #3

Closed bankorh closed 9 years ago

bankorh commented 9 years ago

Hi, I have tried your code in my Windows and Mac and I am still having the same warning. Below are the warnings I got. May I know how to solve this? I am new to this. Thank you and happy new year. =D

My php versions are 5.4 and 5.6

An invalid argument was supplied. in \src\PhpOrient\Protocols\Binary\OrientSocket.php on line 80 An invalid argument was supplied. in \src\PhpOrient\Protocols\Binary\OrientSocket.php on line 81

bankorh commented 9 years ago

Hi, after I did some researches on this socket problem, I found that this page (http://php.net/manual/en/function.socket-get-option.php) did mentioned that the SOCK_STREAM cannot be set by socket_set_option(). I tried to change it to SOL_SOCKET and the warnings gone. Is it safe for me to change the socket level to SOL_SOCKET?

Ostico commented 9 years ago

Hi @bankorh , you're right, there was an error, your solution looks fine. Thank you. Fixed