cgi listen port without sockets

my server requires a static port and I keep getting this error: Unable to launch application ‘XojoTest’ on port 33669

.htaccess:
Options +ExecCGI
order allow,deny
deny from all
<Files *.cgi>
allow from all

config.cgi:
APPNAME=XojoTest
THREAD_COUNT=10
PORT=33669
AUTO_PORT=0

xojotest.cgi:
Starts with - #!/usr/bin/perl -w

What did you set as the Application Identifier?

Dumb question time … what’s the application identifier?

I’m a virgin here

anybody know where’s instructions for this?

Nope. That’s a good question.

If you’re using the RB version it’s found in the app class. Click on it and look to your right. It’s the 4th row down.

If you’re using the Xojo version it’s hiding in that “shared” Build Setting. Look to your right but this time it’s under Build at the very bottom.

Generally the format is: com.yourbizname.yourappname.

oh … then yes, it’s got a unique application ID.

Hoping to find comprehensive instructions on deploying my cgi on a unix server so I can stop asking dumb questions.

Currently the xojoTest files are the only files in my cgi-bin folder

Other possibilities…

Was the app compiled for Linux?

Did you upload the Libs folder?

Does the server have the necessary 32-bit libraries installed?

Do you have shell access? If so, launch the app and see if you get any errors.

You might also try http://documentation.xojo.com/index.php/Deploying_Web_Apps_on_Linux

compiled for Linux (it’s xojo’s xojotest.cgi)
yes of course I uploaded everything xojo provided
trying to find out what’s loaded on the server … they’re pretty progressive (1stHostWeb)

Another thing to ask… It may be that your hosting company doesn’t allow binaries.

Are you hosting in a shared environment or a private server of some kind?

shared environment I think. My hosting company is wide open.

What I really need is instructions, but I can’t seem to find them. any ideas?

Unix server.

Did the link I supplied not work for you?

The only other thing I can think of is that there’s already another app listening on port 33669.

Oh, I guess another possibility would be making sure the binary file and everything in the Libs folder have execute permissions.

I’m using the xojotest cgi for Linux to test.

I’m still not sure about the static port being open. all files have 755 permission setting.

the environment variables are:

Environment Variables:

DOCUMENT_ROOT [/home/circleco/public_html]
GATEWAY_INTERFACE [CGI/1.1]
HTTP_ACCEPT [text/html, application/xhtml+xml, /]
HTTP_ACCEPT_ENCODING [gzip, deflate]
HTTP_ACCEPT_LANGUAGE [en-US]
HTTP_CONNECTION [Keep-Alive]
HTTP_DNT [1]
HTTP_HOST [www.circleconsulting.us]
HTTP_USER_AGENT [Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; BOIE9;ENUS)]
PATH [/usr/local/bin:/usr/bin:/bin]
QUERY_STRING []
REMOTE_ADDR [63.224.89.93]
REMOTE_PORT [58025]
REQUEST_METHOD [GET]
REQUEST_URI [/cgi-bin/test.cgi]
SCRIPT_FILENAME [/home/circleco/public_html/cgi-bin/test.cgi]
SCRIPT_NAME [/cgi-bin/test.cgi]
SERVER_ADDR [74.50.23.140]
SERVER_ADMIN [webmaster@circleconsulting.us]
SERVER_NAME [www.circleconsulting.us]
SERVER_PORT [80]
SERVER_PROTOCOL [HTTP/1.1]
SERVER_SIGNATURE [Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.circleconsulting.us Port 80
]
SERVER_SOFTWARE [Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635]
UNIQUE_ID [qeDon0oyF4wAAHVpV4kAAAAH]

The remote port keeps changing whenever I connect using the web server’s show web environment program.

the cgi_handler in xojotest.cgi gives me an error (I’ve added to the message so I know it’s this error.)

sub cgi_handler {
my $type;
my $length = 0;
my $response;
my $responded = 0;
my $sock = create_socket($app_port);

if (!test_connection($sock)) {
	my $launch = launch($app_port);
	if ($launch == 1) {
		$sock = create_socket($app_port);
		if (!$sock) {
			handle_error("Application launched, but unable to connect using port $app_port.");
			exit;
		}
	} else {
		handle_error("Unable to launch application '$app_name' on port $app_port, damn it");
		exit;
	}
}

I get “Unable to launch application ‘xojotest’ on port 33669, damn it”

Can you ssh into the server and execute the cgi at the command line?

If it give you an error when you do this - tell us what it says.

Are you sure you have 32 bit libraries installed?

I’ve finally gotten an answer from my server folk (this is in xojotest.cgi) …

"I have checked your code and found that the script is trying to create sockets for making connections. Please see the following lines.


my $sock = create_socket($app_port);

if (!test_connection($sock)) {
my $launch = launch($app_port);
if ($launch == 1) {
$sock = create_socket($app_port);
if (!$sock) {

This option is disabled in the server for security reasons in shared server."

This is where I need a set of instructions. How do I work around this? Thanks everyone for your help.

You’re going to need to find another hosting company. Our apps require this.

Thanks … now I know.

Any suggestions for a host?