CGIExample.rb ReadMe

Mac & Windows

On Mac and Windows, it should be a simple case of compiling the CGI and dropping it (and its containing folder on Mac) in the designated CGI folder for Apache. On OS X, this will default to: /Library/WebServer/CGI-Executables.

Running CGIExample.rb on Linux (from scratch)

Thanks to Jeff Hendrickson for this...

REALbasic programs require the Linux GDK Library to run on a Linux Server.

  1. Compile the example, renaming the Linux output file to gox.cgi.
  2. Find out was what version of Linux (Fedora) that you are on your server. From a terminal window I SSH connected to my server, and I executed :
    uname -r
    which returned:
    2.4.22-1.2199.4.legacy.nptl
    I'm running Fedora Core 2.
  3. Install the Linux GDK Library. The exact file that a RB program is looking for is libgdk-x11-2.0.so.0.
  4. The GDK library has some dependencies on other Linux libraries, and rather than try to figure out a minimal subset, I installed all of the ones that I saw listed.

    When you navigate to these URLs, pick out the library version that matches your Linux (Fedora) installation. In this case, mine was Fedora Core 2, on Intel.

    The exact filenames that I downloaded were :

    • glib2-2.4.0-1.i386.rpm
    • atk-1.6.0-1.i386.rpm
    • pango-1.4.1-1.i386.rpm
    • gtk2-2.4.0-1.i386.rpm

    I downloaded the appropriate files to a temporary folder (/temp) on my desktop computer (PowerMac, running Tiger).

    From a terminal window I SSH connected to my server, I then created a temporary directory on my Linux server for these files.

    $ mkdir /temp
    Then, I FTP'ed the files up to the temporary directory on my Linux server.
    $  ftp myserver.com
       ftp> cd /temp
       ftp> mput *.rpm
       ftp> bye

    From a terminal window I SSH connected to my Linux server, I changed to the directory where I FTP'ed the files (/temp).

    $ cd /temp		[change to the directory where you saved everything]
    $ su			[root access is needed to install rpms]
    $ rpm --upgrade *rpm  	[installs the RPMs]

    If the RPMs installed successfully, then you're done with the GDK installation!

  5. You need to make sure that the .cgi file's ownership is set to the site administrator, or better.
    $ chown -R owner:group /mysitepath/cgi-bin/*
    Where owner, and group are set to a site administrator or better, and mysitepath is the actual path to your cgi-bin directory.

    If the permissions/ownership are set correctly, you should be able to call the CGI program from a web browser: http://www.mywebsite.com/cgi-bin/gox.cgi

    1.  

Content engine designed and written by Charlie BoisseauPowered by Mac OS X ServerDNS Hosted by NamesCoGeo Visitors Map

© Charlie Boisseau 2008