reapermedia Posted September 12, 2009 Share Posted September 12, 2009 AAAAAAAAAAAAAAAH!!!! I'm literally pulling my hair out here , i have followed this tutorial: http://www.kirupa.com/developer/flash8/php5sockets_flash8.htm ...to the letter after installing Apache and PHP on my pc. And i am geting really fraustrated because i cannot get the flash objects to connect to the PHP socket when they have been uploaded to the localhost server or any other online server. However it works no problem when i run the flash object straight from my HD. The socket is definately open because telnet connects to it fine. My pc ip is 192.168.1.7. And when I transfer the flash object to any other pc on my lan, if it is on the hd, it connects to my pc no problem. However, if i were to type in http://192.168.1.7/socket_test.swf, it DOESN'T WORK!!! Please help me Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/ Share on other sites More sharing options...
RussellReal Posted September 12, 2009 Share Posted September 12, 2009 thats not your IP thats your subnet ip, you need to find out your network's IP and change the flash app to connect to THAT IP.. also, you need to portforward whatever port you're using to connecty to your computer.. make that port forward to your subnet ip so that the router doesn't dismiss the request due to not knowing where to point the client Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/#findComment-917308 Share on other sites More sharing options...
reapermedia Posted September 12, 2009 Author Share Posted September 12, 2009 Now, just to let you know, I'm only using this for testing purposes so I can test the functionality of php ports in an application I'm developing. Do I still need to do this if I only want to get it to work on my pc. I don't want to have any access to it from outside the network. If I only want to get it to work on my network, or just my own pc, how would I go about getting it to work. Do I still have to do everything you said. And how would I go about doing what you said, in easy to understand terms? Cheers Reaper Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/#findComment-917323 Share on other sites More sharing options...
Alex Posted September 13, 2009 Share Posted September 13, 2009 Btw, I reviewed that tutorial, and I found a problem. Because that's an old tutorial this problem wouldn't have occurred when it was made, but now it will. Within the PHP server where a new client is added "array_push($read_sockets, $client)", you'll have to send flash a response telling it that it's a legit response. As a measure of security this was added in like Flash 9.x. After that line add: socket_write($client, '<?xml version="1.0"?><cross-domain-policy><allow-access-from domain="*" to-ports="*"/></cross-domain-policy>' . chr(0x00)); I don't believe this is related to your direct problem posted in this thread, but you would encounter it next. Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/#findComment-917461 Share on other sites More sharing options...
reapermedia Posted September 13, 2009 Author Share Posted September 13, 2009 Ok, thanks for that, but I'm not sure that a crossdomain action would be needed as it's on the same thread, nevrtheless, I'll add I'd anyway, cheers Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/#findComment-917559 Share on other sites More sharing options...
reapermedia Posted September 13, 2009 Author Share Posted September 13, 2009 Wait..... It Works!!!!!!!!!!!! Woo Hooo!!! And you know what the problem was..... it was the blooming filename of the flash file, it had a space in it, and decided not to work Replaced the space with an underscore, and it works!!! Quote Link to comment https://forums.phpfreaks.com/topic/174009-flash-fails-to-connect-to-php-socket-when-online/#findComment-917608 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.