PDA

View Full Version : Using Server Sockets with PHP



mdueri
01-03-2004, 03:33 PM
I get the following error whenever I try to use a socket.

Call to undefined function: socket_create()

I think I need to enable sockets in my php.ini, but how can I do this?

Thanks in advance.

mdueri

mdueri
01-04-2004, 12:33 PM
The doc says I need to compile php with the following:

--enable-sockets

Do we have any control over this? or does WH have to re-compile php with this option?

wildjokerdesign
01-04-2004, 12:59 PM
I think there is an entry for enable sockets in your php.ini that you can edit.

Bogdan
11-23-2006, 03:25 AM
I can't find the enable-sockets in php.ini
I don't get any error only my script does not execute after socket_create

rolling
11-23-2006, 03:44 AM
It looks like we do not have sockets enabled at build time. Try running this code



<?php

$statement="<center>Code from <a href='http://yourcodes.com/index/index.php'>www.YourCodes.com</a></center>";

echo ("$statement");
echo ("<br>");
echo ("<br>");

phpinfo();
?>


I am not sure if we can build our own copies of php, but it might be worth a try - you will have to specify --prefix=/usr/mylocal as we cannot install to /usr/local.

wildjokerdesign
11-23-2006, 08:21 AM
I am not sure if we can build our own copies of php, but it might be worth a try - you will have to specify --prefix=/usr/mylocal as we cannot install to /usr/local.

Somewhere there is an old post about building your own copy of php. Folks where trying to do this before WH offered php 5. It is possible but I think the results where a bit limited.

Bogdan
11-23-2006, 09:34 AM
It looks like the socket functions are working correctly with Php 5.1.2 installed via control panel.

Bogdan