473,395 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

PHP socket works on Mac, but not on XP Pro

This command works on my home computer:
if($locsock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) echo
"Socket created\n";
My home computer is running Mac OS X, and is on a small LAN behind a
NAT router with a hardware firewall (no software firewall). I tried to
execute the same command on a school computer. It's running XP Pro and
is on a large LAN behind a NAT router and a (very overprotective)
hardware firewall. It's also running "Microsoft Firewall Client for
ISA Server".
Both computers are running PHP 5.05. Heres what I get when I run the
program on the XP computer:
Fatal error: Call to undefined function socket_create() in
E:\client.php on line 4
The schools firewall blocks all outgoing and incoming traffic on all
ports except for 80 (at least all the ones that I've tried) but all I'm
trying to do it make a connection to localhost (127.0.0.1) on port 23.
The hardware firewall shouldn't be able to stop computers inside the
LAN from connecting to themselves, should it? So does that mean it
must be the software firewall that is stopping me? Does anyone know of
a way I can get this to work? I've posted the whole program source
code (its not long) at:
http://www.rascalsteencenter.com/client.txt

Sep 15 '05 #1
4 1736
Seems that both computers don't have the same set modules installed.
That command gives me the same error on my machine. Can't upload to my
unix server at the moment to see if it it does there too.

You problem is well before the firewall, look at the php install.

Sep 15 '05 #2
I downloaded and installed PHP and all of the library files on both
computers just a few days ago from here:
http://www.php.net/downloads.php
Does anyone know the filename for the library that I'm missing?

Sep 15 '05 #3
I guess you and I need to reinstall! Look at this snip form php.net

Installation
The 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.

Note: IPv6 Support was added with PHP 5.0.0.

lol, back to the drawing board!

Sep 15 '05 #4
I don't need IPv6 support. I didn't run the installer for the windows
version. I just put all of the files on a USB flash drive. We aren't
supposed to run installers on the school computers. What I could do is
install PHP with the installer on another windows computer, and copy
the file for that library onto the flash drive, but I don't know the
file name for the library that I need.

Sep 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: anuradha.k.r | last post by:
hi, i am writing a socket program in python,both client side and server side.I've written the client side which is working perfectly fine(checked it against server program written in C).but as for...
4
by: zbcong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a...
2
by: zhebincong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting...
1
by: Dan Kelley | last post by:
I have 2 projects - 1 Winform project that sends Udp messages using the UdpClient class when a button is clicked, and a Console application that listens for these Udp messages. If I try to use...
2
by: Silby | last post by:
I've been messing around with sockets for a bit and i got most of it down (i think). The server side is an asynchronous tcp socket listener with sits and waits for data. The client side uses...
13
by: coloradowebdev | last post by:
i am working on basically a proxy server that handles requests via remoting from clients and executes transactions against a third-party server via TCP. the remoting site works like a champ. my...
10
by: Uma - Chellasoft | last post by:
Hai, I am new to VB.Net programming, directly doing socket programming. In C, I will be able to map the message arrived in a socket directly to a structure. Is this possible in VB.Net. Can...
6
by: Pat B | last post by:
Hi, I'm writing my own implementation of the Gnutella P2P protocol using C#. I have implemented it using BeginReceive and EndReceive calls so as not to block when waiting for data from the...
0
by: Valerie Hough | last post by:
My app currently runs C#, .NET v2.0 on Windows Xp/Windows Server 2003, using asynchronous socket communication. I set up my server socket: Socket s = new Socket( AddressFamily.InterNetwork,...
3
by: A. W. Dunstan | last post by:
I'm creating a socket as follows: m_networkSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); m_networkSocket.LingerState = new LingerOption(true, 1);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.