Running Revolution as CGI on Debian Linux
Revolution is a great development tool for desktop applications. But it can also be run as a CGI on your server which means you can quickly write scripts for use on the web using the syntax you know and love.
This tutorial shows the steps I went through to install the Revolution Linux engine on our Debian Linux server.
For more detailed information on Revolution and CGI check out this article by Jacqueline Landman Gay of HyperActive Software.
To get the standalone (engine), you can sign up for the beta-test program at http://support.runrev.com/beta_test.php.
Locate Linux Standalone Engine
Locate the Linux Standalone engine in your Revolution installation. For me the file is located in the "/Applications/Revolution Enterprise/2.9.0-dp-4/Runtime/Linux/x86-32" folder.
Upload To Server
Upload the Standalone file to your Linux server.
Rename File
Rename the Standalone file to something meaningful. I've renamed the file to revolution.
Set Executable Bit and Update Permissions
In order for the revolution cgi engine to work you must set the executable bit and set permissions on the revolution file.
1) chmod ugo+x revolution sets the executable bit for the file.
2) chmod 755 sets the permissions for the file.
Create Test Script
Create a test.cgi file on your server by issuing the command touch test.cgi.
Edit the Script
Now you can create a simple script to test that everything is working as expected. The key parts are:
1) Telling the script where to find the revolution cgi engine and not to load the UI libraries.
2) Creating an on startup handler.
For this example the test.cgi file is in the same directory as the revolution cgi engine so there was no need to point to the revolution cgi engine using an absolute path.
Run The Script
If all goes well then I live! should print to the terminal window.
What If Things Don't Go So Well?
If your first attempt at running the script did not print I live! to the terminal you may be missing some X11 libraries. The first time I ran the script on my server I was told I didn't have libX11.so.6 installed.
Install libX11-6
Luckily the fix was easy. On my machine I just called sudo apt-get install libx11-6 and the necessary file was automatically installed.
Install libxext6
Unfortunately when I tried to run the script again I saw another error, this time regarding a missing libxext file. Again the fix was easy though. sudo apt-get install libxext6 solved the problem.
Comments (0)
Add your comment