SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I Have an Enom control pannel thats lets people access thier Enom domain and make DNS Settings.

    its a PHP Script and opens a connection to reseller.enom.com

    When trying to use the script I get this error:

    Fatal error: Call to undefined function: socket() in /home/nickb/public_html/dns/EnomInterface_inc.php on line 89


    An Extract of the code is this:

    Code:
    		// Create a TCP/IP socket.
    		$socket = socket( AF_INET, SOCK_STREAM, 0 ); [This is Line 89]
    		if ( $socket < 0 ) {
    			$this->AddError( "socket() failed: " . strerror( $socket ) );
    		} else {
    			// Connect to server
    			$result = connect( $socket, $address, $port );
    			if ($result < 0) {
    				$this->AddError( "connect() failed($result): " . strerror( $result ) );
    			} else {
    				// Send GET command with our parameters
    				$in = "GET /interface.asp?" . $this->PostString . " HTTP/1.0\r\n\r\n";
    				$out = '';
    
    				write( $socket, $in, strlen( $in ) );
    
    				// Read response
    				while ( read ($socket, $out, 2048) ) {
    					// Save in rawdata
    					$this->RawData .= $out;
    				}
    
    				// Close the socket
    				close( $socket );
    Anyone see what the problem is?
    I have tried it on RH/Linux 6.2 and Win98 - both giving the same error.

    Thanks

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    socket() is a PHP4 + function, if you are running PHP3 - there is your problem... otherwise have not a clue

  3. #3
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im running PHP4.0.4pl1


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •