Forum Moderators: coopster
here is the code
[CODE/]<?
set_time_limit ( '0' );
error_reporting ( E_ERROR ¦ E_PARSE );
$_ip = 'otserv.org';
$_port = '7171';
$s = socket_create( AF_INET, SOCK_STREAM, getprotobyname ( 'tcp' ) );
<snipped irrelevant code>
?>[CODE/]
but when i enter it i got the following error
Fatal error: Call to undefined function: socket_create() in c:\apache group\apache\htdocs\on2.php on line 12
can some1 help me?
but when i enter it i got the following error
[edited by: coopster at 1:32 pm (utc) on April 1, 2005]
[edit reason] snipped irrelevant code [/edit]
I read on google that you may not have installed the sockets. Try phpinfo(), there you can see your installed components. I hope that helps a bit.
BTW Welcome to Webmasterworld :)
Best wishes
Michal Cibor
[edited by: coopster at 11:00 pm (utc) on April 1, 2005]
[edit reason] My Polish isn't very good, Michal ;-) [/edit]
mysql is irrelevant in this case. You need to have a php-sockets extension installed. I found an rpm at
[rpms.troels.arvin.dk...]
However they say that it's out of date, so if you find a newer somewhere just install it.
BTW (by the way) Translate all Polish variables in your code to English, so others will also understand you, and as Coopster said, don't paste irrelevant code.
Thanks and hope it helps you
Best regards
Michal Cibor
InstallationThe socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure.
Resource:
[php.net...]
Michal also stated that by running the phpinfo() function you can view your Configure Command and installation directives. Search the page that is displayed to find out if you have enabled sockets. The message you are receiving says that you do not have sockets installed, therefore your script is failing.
[edited by: coopster at 11:57 am (utc) on April 3, 2005]