Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fatal error: Call to undefined function: socket_create()

Status
Not open for further replies.

gapla

Programmer
Dec 15, 2003
37
ES
I get an error when running this script with sockets
Code:
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); 
socket_bind($socket,'localhost',1337); 
socket_listen($socket);
while($connection = socket_accept($socket)) 
{ 
socket_write($connection,'You\'ve successfully connected to my
computer!\r\n'); 
           }

It shouts something like..

Fatal error: Call to undefined function: socket_create() in C:\Archivos de programa\Abyss Web Server\htdocs\sock.php on line 2
 
I'm an absolute novice
How do i compile?
 
As a general rule, you use a compiler.

You question cannot be answered in specific without knowing more information.

On what platform are you running PHP?

With what web server, and will you run PHP as a web server module or as a standalone CGI?



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
SO: W98 and linux
Web server: Abyss and Apache
cgi

I'm proving the next trick before compiling
Find your PHP.INI file, find the line with "php_sockets.dll" and remove the semi colon (;) at the start of the line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top