|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-11-03 18:23 UTC] pickleman78 at sbcglobal dot net
When I attempt to create a socket on any host besides 127.0.0.1 (including my own IP) I get an error...
Php has caused an error in MSCVRT.DLL
Php will now close
I call the script from the command line using php -q socket.php
With the host set to 127.0.0.1 it works just fine. here is a cde piece.
<?php
$host="myipadress;
$port=1863;
set_time_limit(0);
//create a new socket
$socket=socket_create(AF_INET, SOCK_STREAM,0) or die("Could not create a socket\n");
//binds the socket
$result=socket_bind($socket,$host,$port) or die("Could not bind socket\n");
?>
and I get the error. Note myipadress would be my actual IP adress, but i replaced it for security reasons.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 16:00:01 2025 UTC |
How odd. I have found some other interesiting tidbit. It will not accept any string, but this does work... $host=getenv("REMOTE_ADDR");