NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Sockets


Joined: 13 Oct 2006
Posts: 14
Reply with quote
Code:
<?php

// create socket
$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");

socket_close($socket);

?>


Hi,

I am trying to run the above code snippet and I get "call to undefined function socket_create()".

Is there something I have to do in PhpED to load the socket library?

Thanks
Phil
View user's profileFind all posts by BeerFizzSend private message


Joined: 05 Jan 2005
Posts: 16
Location: Austria
Reply with quote
this is accomplished the same way as you would do it on any other LAMP installation. edit the php.ini file and add the extension.
View user's profileFind all posts by matSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
right, socket_create() is not an embedded function. It comes with socket php extension so this extension has to be installed.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 13 Oct 2006
Posts: 14
Reply with quote
Got it.

Thanks guys.
View user's profileFind all posts by BeerFizzSend private message
Sockets
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic