472,981 Members | 1,514 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Unable to create socket

HI all,

I have PHP5.1.2 & Apache on my PC and I'm trying to connect PHP via a
socket to a java app acting as a server.

I'm failing at the first PHP hurdle.

The following line returns fatal error : Call to undefined function
socket_create() in <filename>.php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

Configuration: Php.ini lines
default_socket_timeout = 60
extension=php_sockets.dll
extension_dir = "./"
; tried with "./ext" same result... so I coppied php_sockets.dll
to php5 root folder
enable_dl = On ;maybe not relevant

phpinfo()
The only socket related items I can find are
Registered Stream Socket Transports | tcp, udp
default_socket_timeout | 60

Does anybody know what I'm doing wrong?

Thanks for reading this.

Aug 14 '06 #1
1 4322
The answer is simple.

It's the damn firewall... there are no warnings or notices when the
module doesn't show.

If you are using zone alarm or the likes, add php to the program list
and specifically allow internet access.

This goes for the hundreds of other people who have posted similar
messages and can get no explantaion.

Aug 14 '06 #2

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

Similar topics

0
by: Steve - DND | last post by:
We are continually receiving timeout, and "Unable to write data to the transport connection" errors while using the System.Net.HttpWebRequest class from an ASP.Net web page. Below are the two...
12
by: MuZZy | last post by:
Hi, Sorry for a repeated post but i didn't receive an answer and will try to re-phrase my question: How do i close an additional thread from the main thread, if this additional thread is stuck...
4
by: Josema | last post by:
Hi to all, Im searching a hand to solve an Exception that i get when i try to give the user to a gmail account... Any help would be appreciated.. Thanks in advance This is a piece of my...
0
by: Paul.Net | last post by:
Hi I can access a web service from the from a website on 1.1 frame work but I am not able to access the web service from a website on 2.0 framework. Both the web sites are on the same box...
5
by: Arno | last post by:
reposted with the right microsoft managed newsgroup ID: Sorry for the inconvinience Hi, I've written a class for client-socket connection, but I get a lot of times the error message "Unable...
3
by: tshad | last post by:
I am getting the error: Unable to serialize the session state. Please note that non-serializable objects or MarshalByRef objects are not permitted when session state mode is 'StateServer' or...
0
by: sbsrulz | last post by:
Hi all... I am using the parlay x third party call web service in my c# application. I coded a little and called the main functionality for making a call. Now when i test the service... Its there,...
3
by: ros | last post by:
Hi! I have a simple PHP script: $mbox = imap_open ("{localhost:993/imap/ssl}INBOX", "test@domain.com", "123"); if(!$mbox) { echo 'Error: '.imap_last_error().'<br/>'; } Script works fine...
0
by: sriraghaven | last post by:
Hi, I am trying to create a socket connection to a service running at a local port using PERL. But i am not able to create a socket connection. But it is working fine when creating a connection...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.