473,397 Members | 1,974 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,397 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 4341
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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,...
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
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...

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.