Migrated to a Webhost, PHP Socket troubleshooting difficult
Posted: Wed May 09, 2007 1:51 pm
Dear all,
I am somewhat of a PHP novice, but since I've had many years of programming experience in other languages I managed to get a rather large project up and running. On my own Apache server on my laptop. Since it is a multiplayer web application (non-commercial), I purchased webhosting and started to migrate the files there. Now I need help debugging the socket functions which do not seem to work. If any of you can give me a hint it would be greatly appreciated. Here's the background:
- I have a PHP shell script that listens for incoming sockets.
- In migrating this script to the webhost, I changed the line to . This is later used in socket_bind.
- I am using a virtual private server with a shared IP.
- The hosting company tells me that the port I'm using is not firewalled.
- The shell script seems to run fine without timing out.
- The Flash client has been migrated fine (or so it appears), non-socket communication with the server works.
- When I try to create a socket connection from the client, it doesn't work.
Do any of you have an idea what could be wrong? Is the code I changed OK? Do I need to change more? Do I have to make sure my hosting company supports the socket process in any particular way? I am puzzled. The whole code takes up page after page and I probably shouldn't post that much here. However, if anyone is particularly interested in all the Actionscript and php functions involved, I can supply those of course.
Your help is greatly appreciated!
Thanks & best regards
Matthias
I am somewhat of a PHP novice, but since I've had many years of programming experience in other languages I managed to get a rather large project up and running. On my own Apache server on my laptop. Since it is a multiplayer web application (non-commercial), I purchased webhosting and started to migrate the files there. Now I need help debugging the socket functions which do not seem to work. If any of you can give me a hint it would be greatly appreciated. Here's the background:
- I have a PHP shell script that listens for incoming sockets.
- In migrating this script to the webhost, I changed the line
Code: Select all
$address = 'localhost';Code: Select all
$address = 'www.risk-online.net';- I am using a virtual private server with a shared IP.
- The hosting company tells me that the port I'm using is not firewalled.
- The shell script seems to run fine without timing out.
- The Flash client has been migrated fine (or so it appears), non-socket communication with the server works.
- When I try to create a socket connection from the client, it doesn't work.
Do any of you have an idea what could be wrong? Is the code I changed OK? Do I need to change more? Do I have to make sure my hosting company supports the socket process in any particular way? I am puzzled. The whole code takes up page after page and I probably shouldn't post that much here. However, if anyone is particularly interested in all the Actionscript and php functions involved, I can supply those of course.
Your help is greatly appreciated!
Thanks & best regards
Matthias