reinderien Posted December 19, 2011 Posted December 19, 2011 Hello. First, thanks for this service - it's a great testbed for web app design, and the functionality is quite good especially considering the price. I'm trying to learn how to design a socket server in PHP. This server would run in the background, and perform low-bandwidth operations over TCP. http://www.heliohost...s/languages/php indicates that this installation of PHP supports sockets, which is good. I face several challenges. Firstly, I think this would require the use of a cron job that checks for a certain process string (the PHP interpreter + script), and if it does not exist, starts it and backgrounds it with an "&". However, even my most rudimentary cron job experiments that don't even use PHP seem to not work - scheduling a daily cron job in cPanel to concatenate a simple string to a file in my home directory does not seem to produce that file. So I don't know what's going on there. Also, reading from an account of a partially related situation (http://www.helionet...._mode__threaded), it seems that by default it is impossible to have a TCP port open for general use. Do you have any advice to address these issues? Thank you.
Guest xaav Posted December 24, 2011 Posted December 24, 2011 Sorry, but HelioHost does not support socket servers due to security reasons. Also, I do not know of any other host (even paid) that supports this without purchasing a Virtual Private Server. However, you could have your web page call a script via ajax every five seconds to check for updates to some information.
reinderien Posted December 24, 2011 Author Posted December 24, 2011 Sorry, but HelioHost does not support socket servers due to security reasons. Also, I do not know of any other host (even paid) that supports this without purchasing a Virtual Private Server. However, you could have your web page call a script via ajax every five seconds to check for updates to some information. Thanks for the information. I've since developed a workaround that seems to be working for "push" support: have the client connect to the server running PHP; have the server and client both maximize their timeouts; and then have the server echo and flush whenever something interesting happens.
Guest xaav Posted December 25, 2011 Posted December 25, 2011 Glad your question got answered! Please spare a few minutes to take our brief survey: http://feedback.heliohost.org/ Your participation in this survey is greatly appreciated.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now