473,666 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP socket works on Mac, but not on XP Pro

This command works on my home computer:
if($locsock = socket_create(A F_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 1743
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
8513
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 my server program written in python it simply hangs.it does not show any error also.I've tried sample programs available .I don understand what the reason is as i am quite new to it. here is teh server side program: ///////////////////////
4
7080
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 incoming connection,the relative code snipprt as following:: private IPAddress myIP=IPAddress.Parse("127.0.0.1"); private IPEndPoint myServer; private Socket socket; private Socket accSocket; private System.Windows.Forms.Button button2;...
2
26501
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 for a incoming connection,the relative code snipprt as following:: private IPAddress myIP=IPAddress.Parse("127.0.0.1");
1
3953
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 the UdpClient class to receive, it never works. The messages are never received (no exceptions). If I use a normal socket configured to listen for Udp messages, it works perfectly. Below is my sample code. It is only test code - I know the...
2
4273
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 TcpClient to connect. Connecting, sending and receiving data, error handling, ... all works fine. The problem is when closing the connection. Now as i understand it, closing the socket works as follows: client -> tcp finish command
13
2640
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 problem is executing the transactions against the remote server and returning the response to the remoting client. i can open the socket fine and, if i am executing one transaction at a time, everything works great. it's when my proxy server...
10
4024
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 anyone please help me with some sample codings and guidance? Can you also suggest some other news group available for socket programming in VB.Net?
6
6991
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 supernode. Everything I have written works fine sending and receiving uncompressed data. But now I want to implement compression using the deflate algorithm as the Gnutella protocol accepts: Accept-Encoding: deflate Content-Encoding: deflate in the...
0
2804
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, SocketType.Stream, ProtocolType.Tcp ); IPEndPoint ep = new IPEndPoint( IPAddress.Any, 0 ); s.Bind( ep ); int port = ep.Port;
3
3043
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); m_networkSocket.Blocking = true; m_networkSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); m_networkSocket.SetSocketOption(SocketOptionLevel.Socket,
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6191
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.