Click to See Complete Forum and Search --> : Invalid argument: getsockname


Anon
01-28-2002, 09:34 AM
Every time I try and execute a simple opening of a remote file:
<? $fcontents = file ('http://www.php.net/'); ?>

I get an alert box saying "The attempt to load 'Accessing URL http://blah.com/test.php' failed"

My apache error log file says

[Mon Jan 28 08:27:55 2002] [error] (22)Invalid argument: getsockname
[Mon Jan 28 08:27:55 2002] [notice] child pid 14560 exit signal Bus error (10)


Anyone have any idea how I can fix this, or what in fact is broken? I've recompiles PHP a number of times but to no avail.

Anon
01-29-2002, 12:24 PM
OK, after MUCH searching I found the problem, so will post here for anyone else who comes across this.

I had an ipfw ruleset blocking a couple of outgoing ports (left in from something a while ago)- deleting these rules allowed for fopen('url') and file('url') to work again.

:-)