CGI error on deployment

Hello Everyone
I am not a PERL programmer. I intent to run a cgi web app created with xojo at a hosting service a have.
This is a simple test with a button and a label… when the action event happens in the button, the label show “hello word”, that simple.
After talking with the hosting agents they provide me with clues of the issue.

The line numbers do not match, but, the code fragment is:

           do {
		$sock->recv($type,1);
		$sock->recv($length,4);
		
		$type = unpack('C',$type);
		$length = unpack(PACK_KEY,$length);
		
		$response = '';
		do {
			my $chunk_size = $length - length($response);
			if ($chunk_size > MAX_CHUNK) {
				$chunk_size = MAX_CHUNK;
			}

where the second DO will be line 130 and my $chunck… will be line 131
Is there something I have to change during the building process to avoid this error?
If not… what should read the generated code base on the quote.

In advanced, thanks

Regards

That reminds me of what happened the first time I tried to run a Xojo CGI on my hosted web site.

There is basically nothing you can do at the compile level to make it run. I did quite a bit of Perl in the nineties, but I am afraid even if you were able to amend the code, a CGI is nothing but a launcher for a binary executable. Often enough, hosted sites are simply not able to run such executable.

Perhaps what you could try is to run a standalone. If you have access to the command line, it is pretty easy to run. Otherwise, you can use cron to schedule the launch.

That said, you may not want to waste too much time on that, but rather go to a more sensible solution. I have been using the services of 1701 Software for now 6 years. It simply works. Upload the cgi, and it runs flawlessly. Prices are not that expensive, and if you have any professional needs, peace of mind is priceless. Better yet, Phillip Zedalis who runs it is a member of this forum.

The other, luxury service is Xojo Cloud. It deploys automatically and runs like clockwork, I was told. It did not exist when I started with Phillip, and I never tried it.

Hi Nieves,
if you are running your web app on a Linux server take a look if you have deployed the file .htaccess: if so, delete it!

Was any solution found for this? I have a project which has been deployed on Linux for several years, and all of a sudden, has started throwing this error.

I’ve validated that there’s no .htaccess file. The ‘old’ (built a month before, same version of Xojo) works fine, the new version throws this error. I don’t think it has anything to do with the cgi script part of things.

This error is indicative of the app crashing or hanging before returning a response to the browser.

Yeah, was thinking a crash, but trying to isolate where it is happening is being … fun.

Developing on a Mac, deploying as an Apache CGI. Since I rarely have these issues, not exactly sure where to start debugging. I suppose writing to a log someplace to see where things are going sideways…

You could run it stand alone on your deployment platform with remote debugging if you have access to set it up that way.

[quote=495460:@Darryl Snover]Yeah, was thinking a crash, but trying to isolate where it is happening is being … fun.

Developing on a Mac, deploying as an Apache CGI. Since I rarely have these issues, not exactly sure where to start debugging. I suppose writing to a log someplace to see where things are going sideways…[/quote]
Implement App.UnhandledException to start and have it write the Exception type and stack to a file. There’s a good example of getting the name in the docs for Introspection.

The other thing you might try is launching the app from the command line to see if the crash is due to a missing dependency or using ldd:

./MyApplication ldd MyApplication