That title is going to seem a bit odd but let me explain. First, I would guess that the dathorn servers are not going to allow any script to run indefinitely to listen for websocket connections. However, I am hoping that they will allow it run for a few minutes at a time so I can just use it for testing (eventually I'll just get a VPS).
But to get any script to run in the background I need to first figure out why I can't get in using SSH. I did create the public and private keys, "authorized" the public key, and downloaded both files. I tried using the Java based SSH console included in cPanel, I also tried using FireSSH (firefox addon) and when prompted I provided them with the private key. The java console just sat there and did nothing, but max out my cpu for 5 minutes, till I exited the page. The FireSSH told me authentication failed. I tried deleting and making new keys but it still didn't work. I haven't had a good reason to use SSH till now and with the warning, about account termination, that is in the SSH section I am also hoping there is good place to find some relevant documentation.
Now to the rest of the problems. I have built a websocket server with php, that runs fine with wamp on my computer. But to build it to simulate multithreading I would need to use the pcntl_fork function, which needs a *nix server, which is why I needed the SSH (and will still need for any other language). But as I understand php is a poor choice, speed and resource wise, for a large number of concurrent connections, I thought I should look into using another languages.
Now I have been using php and javascript for over 10 year and have had occasion to dabble in languages like LUA, C++, and C#. So picking up another language is not going to be an issue. The problem I am hitting is getting them to run. Too keep it a simple as possible I am just using simple "Hello World" scripts.
Here's the perl script I am trying, just copied and pasted it from a tutorial
I have changed the permission on the file to allow it to be executed and read (755), I have tried it in and out of the "cgi-bin" folder, and I have tried changing the first line to point the perl folder in the account (../perl). All are giving me this error
I also tried ruby and the same thing happened, even if I used the .cgi file extension. Searching Google turned up very little on what that error means. It's so bad that the search term "ruby lscgid execve() Permission denied" gave only 7 results. Completely stunned me that Google had so utterly failed to find the solution.
So I would guess some how I am not pointing to the perl or ruby directories properly or the file is not in the correct location.
Also is there some way to avoid having to change the permission every time you upload the file. When testing I have been know to upload the same file hundreds of times and some of my bigger php project have had hundreds of files. I can't imagine having to build a web application in perl or ruby I think I would go insane.
Last I wanted ask about using Python and C++. First is python setup on basic web hosting accounts, or can it be used through a 3rd part module (not preferred but good to know)? And I assume C++ is allowed but with the problems with perl and ruby I figure I would have the same issues with it, anything I need to know there?
Any advice is appreciated. Sorry about he long post but I try not to ask questions till I have exhausted all possibilities, which usually results in a lot more questions.
But to get any script to run in the background I need to first figure out why I can't get in using SSH. I did create the public and private keys, "authorized" the public key, and downloaded both files. I tried using the Java based SSH console included in cPanel, I also tried using FireSSH (firefox addon) and when prompted I provided them with the private key. The java console just sat there and did nothing, but max out my cpu for 5 minutes, till I exited the page. The FireSSH told me authentication failed. I tried deleting and making new keys but it still didn't work. I haven't had a good reason to use SSH till now and with the warning, about account termination, that is in the SSH section I am also hoping there is good place to find some relevant documentation.
Now to the rest of the problems. I have built a websocket server with php, that runs fine with wamp on my computer. But to build it to simulate multithreading I would need to use the pcntl_fork function, which needs a *nix server, which is why I needed the SSH (and will still need for any other language). But as I understand php is a poor choice, speed and resource wise, for a large number of concurrent connections, I thought I should look into using another languages.
Now I have been using php and javascript for over 10 year and have had occasion to dabble in languages like LUA, C++, and C#. So picking up another language is not going to be an issue. The problem I am hitting is getting them to run. Too keep it a simple as possible I am just using simple "Hello World" scripts.
Here's the perl script I am trying, just copied and pasted it from a tutorial
Code:
#!/usr/bin/perl -w use strict; my $message = "Hello, world!"; print "Content-type:text/html\n\n"; print <<HTMLSTOP <html> <body> $message </body> </html> HTMLSTOP
lscgid: execve():/home/[accountname]/public_html/HelloWorld.pl: Permission denied
So I would guess some how I am not pointing to the perl or ruby directories properly or the file is not in the correct location.
Also is there some way to avoid having to change the permission every time you upload the file. When testing I have been know to upload the same file hundreds of times and some of my bigger php project have had hundreds of files. I can't imagine having to build a web application in perl or ruby I think I would go insane.
Last I wanted ask about using Python and C++. First is python setup on basic web hosting accounts, or can it be used through a 3rd part module (not preferred but good to know)? And I assume C++ is allowed but with the problems with perl and ruby I figure I would have the same issues with it, anything I need to know there?
Any advice is appreciated. Sorry about he long post but I try not to ask questions till I have exhausted all possibilities, which usually results in a lot more questions.
Comment