PHP Classes

Errors when using class

Recommend this page to a friend!

      Battlefield 2 Server Query  >  All threads  >  Errors when using class  >  (Un) Subscribe thread alerts  
Subject:Errors when using class
Summary:Errors when using class (see message)
Messages:3
Author:dave
Date:2006-04-22 15:05:47
Update:2006-04-24 07:49:47
 

 


  1. Errors when using class   Reply   Report abuse  
Picture of dave dave - 2006-04-22 15:05:47
When trying to run the sample script I get the following error message:

Warning: socket_sendto() unable to write to socket [0]: The attempted operation is not supported for the type of object referenced. in D:\wwwroot\miraclemaker\dta\bf2class\battlefield-2-class.php on line 36

This is then followed by a bunch of subsequent errors. I'm using PHP version 4.4.2 on windows (CGI version), and the socket extension is enabled.


  2. Re: Errors when using class   Reply   Report abuse  
Picture of Ed Ed - 2006-04-24 01:52:22 - In reply to message 1 from dave
I am also getting errors:

Notice: Undefined index: 204.11.239.228 in C:\Inetpub\wwwroot\NewWeb\bf2srvqry\battlefield-2-layout.php on line 38

Notice: Undefined index: 16567 in C:\Inetpub\wwwroot\NewWeb\bf2srvqry\battlefield-2-layout.php on line 38

Fatal error: Call to undefined function: socket_create() in C:\Inetpub\wwwroot\NewWeb\bf2srvqry\battlefield-2-class.php on line 33

  3. Re: Errors when using class   Reply   Report abuse  
Picture of dave dave - 2006-04-24 07:49:48 - In reply to message 2 from Ed
The notices are safe to ignore. It's because of your PHP setup that you're seeing these, people generally have them switched off. The fatal error is becasue you don't have the sockets extension switched on, you can enable this in your php.ini.

Once you've done that I'd be interested to hear if you get the same error as me.