@4u schreef:
Hi, I have a problem with fsockopen in connection with the UNIX abstract namespace. To open a UNIX socket in the abstract namespace I have to add a nul byte in front of the path. Unfortunately PHP returns fsockopen() [function.fsockopen]: unable to connect to unix://:0 (Connection refused) for unix://\x00/tmp/dbus-whatever which is a bit strange because I expected at least the error message "fsockopen() [function.fsockopen]: unable to connect to unix://[NUL byte]/tmp/dbus-whatever:0 (Connection refused)"
your problem might be version related, but php does have a C level function php_stream_sock_open_unix() explicitly for the issue of the NUL byte (the NUL byte is seen as the end of a string, unless the string handling is binary safe - if I got the lingo correct). my first guess would be to use socket_create() in combination with socket_connect() instead of fsockopen() and see if that does the trick.
Is this a known issue or do I have to set something in the php.ini? I would appreciate any ideas how to debug this issue.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php