Web app running but no web page presented.

I built my application and ran it. (I’m on MAC OS X 10.8, built with RS 2012 2.1)
This app runs fine in the debugger but when I run it after building it then things go wrong.

sudo ./My\\ Application --port=9000

I open a web browser at localhost:9000 but all I get is a spinning wheel. (ditto for 127.0.0.1:9000)
I thought maybe it was a permissions issue so I tried changing the executables owner to root/wheel… no difference.

ls -al drwxr-xr-x 8 bobrien bobrien 272 16 Jul 16:03 . drwxr-xr-x 4 bobrien bobrien 136 16 Jul 16:03 .. -rw-r--r--@ 1 bobrien bobrien 86 15 Jan 2013 .htaccess -rwxr-xr-x 1 root wheel 5627282 16 Jul 16:03 My Application drwxr-xr-x 11 root wheel 374 16 Jul 16:03 My Application Libs drwxr-xr-x 3 root wheel 102 16 Jul 16:03 Resources -rw-rw-rw-@ 1 root wheel 58 16 Jul 16:03 config.cfg -rwxr-xr-x@ 1 root wheel 10396 15 Jan 2013 myapplication.cgi

ps -ax | grep "My Application"

5493 ?? 0:00.15 ./My Application --port=9000 5559 ttys000 0:00.00 grep My Application

telnet localhost 9000 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'.

Finally I give up and kill the process and the web browser spits out an error message saying:

No Data Received

My firewall is off…

Figured it out… changed the build settings from CGI to standalone and now it works…

any idea why?

https://documentation.xojo.com/index.php/Web_Deployment_Overview

You should also review the Web Deployment section in Chapter 1: Deploying your Apps in User Guide Book 4: Development.

It’s quite simple. The differences of cgi and stand alone are many.
A cgi app is “driven” by a webserver, like apache2.
Apache launches an app instance when it’s accessed. A stand alone app has a built in web server and is launched manually. No apache2 or similar is required.
As Paul suggested, take a look at the links. They explain it way better than me :wink:

Thank you.