# Security Domain Issue with Socket Server

**URL:** <https://forum.kirupa.com/t/security-domain-issue-with-socket-server/290388>\
**Category:** flash\
**Created:** [June 13, 2009, 9:07pm UTC](https://forum.kirupa.com/t/security-domain-issue-with-socket-server/290388 "2009-06-13T21:07:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thankyoumike](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@thankyoumike](https://forum.kirupa.com/u/thankyoumike)\
**Post date:** [June 13, 2009, 9:07pm UTC](https://forum.kirupa.com/t/security-domain-issue-with-socket-server/290388/1 "2009-06-13T21:07:21Z")

</div>

Hey everyone,

First post here… been using this as a resource forever!! Thanks in advance for reading.

My site is [www.thankyoudesign.com](http://www.thankyoudesign.com) – I’ve written a PHP socket server which I use to support a small chat as well as a way to see all the other people’s characters in (almost) realtime.

The problem is, the socket server connection works fine locally, but automatically disconnects when viewed from the web.

I am trying to use Port 7777 … could that be the problem?

I’ve tried a whole bunch of stuff… allowScriptAccess = always, tried connecting to the domain name and the IP, System.security.allowDomain, System.security.allowInsecureDomain.

I also created a crossdomain.xml:

```auto
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
   <site-control permitted-cross-domain-policies="all" />
   <allow-access-from domain="*" />
   <allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>

```

Nothing seems to help… although after I did all that, it stopped disconnecting instantly and then taking about 5 seconds to disconnect.
