# Php-flash sockets

**URL:** <https://forum.kirupa.com/t/php-flash-sockets/259836>\
**Category:** Uncategorized\
**Created:** [May 9, 2008, 6:34am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836 "2008-05-09T06:34:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![amritakrishna](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@amritakrishna](https://forum.kirupa.com/u/amritakrishna)\
**Post date:** [May 9, 2008, 6:34am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/1 "2008-05-09T06:34:07Z")

</div>

I have created a php socket server and and flash client after reading the following link.

[http://www.kirupa.com/developer/flas…s\_flash8\_2.htm](http://www.kirupa.com/forum/../developer/flash8/php5sockets_flash8_2.htm)

Its working in local windows server.But its not working in linux server.  
The php socket is running ,client also is running .But its not connecting to the socket.  
Is there any thing i have to install or configure in fedora core 4 to run this?

thanks in advance

---

<div class="post-metadata">

**Author:** ![tho\_non](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tho\_non](https://forum.kirupa.com/u/tho_non)\
**Post date:** [May 15, 2008, 3:55pm UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/2 "2008-05-15T15:55:15Z")

</div>

I have dowloaded a php socket server and flash client after reading tutorial:kirupa:[http://www.kirupa.com/developer/flas...s\_flash8\_2.htm](http://www.kirupa.com/developer/flas...s_flash8_2.htm)  
I copy to xampp/htdocs/sockets ang edit address:127.0.0.1 port: 80 in file socketTut.php because I want to run on localhost but error!!! _Server connection failed!._  
I run in local windows server  
HELP ME !!!

---

<div class="post-metadata">

**Author:** ![quicknation](https://avatars.discourse-cdn.com/v4/letter/q/b4bc9f/32.png) [@quicknation](https://forum.kirupa.com/u/quicknation)\
**Post date:** [May 15, 2008, 9:42pm UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/3 "2008-05-15T21:42:13Z")

</div>

I also downloaded the Files from the “\*\*PHP 5 \*\*Sockets with Flash 8”. When I place it at xampp/htdocs using a port like 1234 it works fine. I read somewhere that ports must be above 1024.

---

<div class="post-metadata">

**Author:** ![tho\_non](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tho\_non](https://forum.kirupa.com/u/tho_non)\
**Post date:** [May 16, 2008, 3:35am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/4 "2008-05-16T03:35:31Z")

</div>

you have changne code socketsTut.fla or socketTut.php ?

---

<div class="post-metadata">

**Author:** ![tho\_non](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tho\_non](https://forum.kirupa.com/u/tho_non)\
**Post date:** [May 16, 2008, 4:21am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/5 "2008-05-16T04:21:26Z")

</div>

thank quicknation, I have run program!!!

---

<div class="post-metadata">

**Author:** ![quicknation](https://avatars.discourse-cdn.com/v4/letter/q/b4bc9f/32.png) [@quicknation](https://forum.kirupa.com/u/quicknation)\
**Post date:** [May 17, 2008, 6:16am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/6 "2008-05-17T06:16:29Z")

</div>

> [@tho\_non;2326970](#):
>
> you have changne code socketsTut.fla or socketTut.php ?

Yes I have changed the code.

In PHP:  
$address = “[beta.server.de](http://beta.server.de)”;  
$port = 32081;

In Flash:  
mySocket.connect(“[beta.server.de](http://beta.server.de)”, 32081);

When I run this on the server (starting with putty) everything runs fine. But only if you have \*\*NOT \*\*updated the flasplayer to Version 9.0.124 (its the newest Version offerd on [adobe.com](http://adobe.com)). Then the connection is always failed.

Even if I use a crossdomain.xml that should be in the syntax needed since Step 2 of the “policy-update” by flashplayer 9.0.124.

The crossdomain.xml:  
\<cross-domain-policy\>  
\<allow-access-from domain=“[beta.server.de](http://beta.server.de)” to-ports=“32081”/\>  
\</cross-domain-policy\>

I don’t know what to do anymore… Since one week i try to fix this problem… 👽:sad::hangover:

---

<div class="post-metadata">

**Author:** ![evanadelman](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@evanadelman](https://forum.kirupa.com/u/evanadelman)\
**Post date:** [June 17, 2008, 12:09am UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/7 "2008-06-17T00:09:28Z")

</div>

having similar trouble, but on Macs - I don’t know if it’s a flash player version problem or what, but the mac browser Flash client is definitely looking for something different than Win.

---

<div class="post-metadata">

**Author:** ![evanadelman](https://avatars.discourse-cdn.com/v4/letter/e/c5a1d2/32.png) [@evanadelman](https://forum.kirupa.com/u/evanadelman)\
**Post date:** [June 17, 2008, 3:53pm UTC](https://forum.kirupa.com/t/php-flash-sockets/259836/8 "2008-06-17T15:53:14Z")

</div>

[http://djz.hu/blog/2007/07/26/php-socket-server-chat-gateway-for-flash-clients/](http://djz.hu/blog/2007/07/26/php-socket-server-chat-gateway-for-flash-clients/)  
has some updated code to help handle policy file requests that I found occurring in mac clients.
