Learning CGI - Woes

2010-08-10 Thread Bob Cole
On August 4th there was a lot of chatter SQL queries and logins going across 
the network and what a bad idea that is.  There was discussion about CGIs and
Jacque's tutorial and other resources that I have now studied. I know I have 
followed the steps (many times) but I can't get the Hello World script to work! 
Here is my set up:
- I am using Mac OS X 10.6.4 and Web Sharing is on.
- I put copied the script from Jacque's tutorial into BBEdit, 
  saved it with Unix line endings (LF) and Unicode (UTF-8):
#!revolution -ui

on startup
  put Content-type: text/plain  cr  cr  
  put Hello World!
end startup
- I put this hello.cgi file into the /Library/WebServer/CGI-Executables folder.
- I copied the standalone to the CGI-Executables folder from:
   /Applications/Revolution Enterprise/4.0.0-gm-1/Runtime/Mac OS \
   X/x86-32/Standalone.app/Contents/MacOS/Standalone

- I renamed it as revolution
- I used chmod 755 on both hello.cgi and revolution
- I call the script from FireFox 3.6.8 with 
  http://localhost/cgi-bin/hello.cgi

- In the browser I see:
Internal Server Error [...snip...]

- In the console I see:
[Tue Aug 10 17:56:16 2010] [error] [client ::1] Tue Aug 10 17:56:16 \
 myMac.local revolution[1589] Error: kCGErrorFailure: Set a breakpoint @ \
 CGErrorBreakpoint() to catch errors as they are logged.
[Tue Aug 10 17:56:16 2010] [error] [client ::1] Premature end of script \
 headers: hello.cgi

I used the Terminal and ran: ./revolution ./hello.cgi but there is no output

Nothing works. What am I missing? Do I have to modify httpd.conf?

I put a simple perl script in the cgi-bin folder and it runs fine.  
I even tried some php scripts and they run ok from the cgi-bin folder, too.

Any help would be appreciated!
Bob

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


browser messages, Pass them?

2010-08-08 Thread Bob Cole
I use revBrowser in a stack and it works fine.
I noticed that a message is sent when I click on a link in the browser window:
 browserBeforeNavigate 10:00:35 PM (11005)
What does the number in parentheses mean? Process ID?

I trap this message in a card handler so I can update a status field
   on browserBeforeNavigate
  put Page Loading into field Status
  --pass browserBeforeNavigate --?
   end browserBeforeNavigate

I also trap the browserDocumentComplete message
   on browserDocumentComplete
  put Page Loaded into field Status
  --pass browserDocumentComplete --?
   end browserDocumentComplete

Should I pass these browser messages? Does it hurt if I don't?
Any other thoughts would be welcome, too.
Thanks,
Bob

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: File lists

2010-07-29 Thread Bob Cole
I was intrigued by the File Lists discussion so I spent some time on playing 
with AppleScript.
I uploaded a stack to RevOnLine that demonstrates how to use AppleScript to 
access lots of information about a file.
Take a look for:  AppleScript File Info
Hope this may be useful,
Bob

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Listing available MYSQL databases

2010-05-25 Thread Bob Cole
If you put SHOW DATABASES; in a text file on the target 
machine then you can execute the following statements
(watch for line breaks):
 put /usr/local/mysql/bin/mysql -u username -ppassword  
'/usr/local/ShowDatabases.txt' into myCommand
 put shell(myCommand) into message box
That works for me on my Mac with OS X 10.6.3
Bob


Tue, 25 May 2010 11:41:21 -0700, Glen Bojsza gboj...@gmail.com wrote:
HI Joe,
You are correct and this has help solve my problem.
regards,
Glen

On Tue, May 25, 2010 at 10:32 AM, Joe F. jo...@mac.com wrote:
 This script would make promysql evaluate to mysqlshow - u  nrl -pnrl1
 On May 23, 2010, at 3:36 PM, Glen Bojsza wrote:
 
 Hello,
 Has anyone successfully used either open process or get shell() to list
 the databases available on a machine.
[...snip...]
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Remote SQL databases

2010-05-24 Thread Bob Cole
I am not a MySQL expert but I have found that it is possible to join different 
databases, each with various tables. 
The trick is to use the database name to fully qualify the table and item such 
as:
   SELECT db1.table1.item1, db2.table2.item1 FROM db1.table1, db2.table2 WHERE 
...

Here is a sample that I have used successfully:
   put SELECT  db1.table1.date,  into tSQLcommand
   put db2.table2.type, FORMAT(db2.table2.amount,2),  after tSQLcommand
   put db1.table1.code1  after tSQLcommand
   put FROM db1.table1  after tSQLcommand
   put INNER JOIN db2.table2 ON db1.table1.code1 = db2.table2.code2  after 
tSQLcommand
   put WHERE db2.table2.amount  1.00  after tSQLcommand
   put ORDER BY db1.table1.date;  after tSQLcommand 
   put revDataFromQuery(tab, return, tConId, tSQLcommand) into tItems

I did not find it necessary to give the databases alias names.
In my situation, both databases are on the same machine and can be accessed 
using the same username/password.
Hope this helps.
Bob


Date: Sun, 23 May 2010 18:19:24 -0300, From: Andre Garzia 
an...@andregarzia.com
Subject: Re: Remote SQL databases

I did it on my 6k thousand table database...

It works fine for us.

I have something like

select Database1.* from DatabaseName1.Table1 as Database1,
DatabaseName2.Table2 ...

On Sun, May 23, 2010 at 4:34 PM, Mark Wieder mwie...@ahsoftware.net wrote:

 Bob-
 
 Sunday, May 23, 2010, 12:04:03 PM, you wrote:
 
 Oh hello! You are saying you CAN do a join on a table that is not in
 the same database?
 
 Well, I haven't tried it, bu Mark S. implied that it was possible with
 two different aliases...
 
 --
 -Mark Wieder
 mwie...@ahsoftware.net

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Move Rev to New Computer

2010-04-25 Thread Bob Cole
J. Landman Gay jac...@... writes:
 You don't need to do anything special, just copy over all your files. If 
 you use the Mac's automatic file-copier (forget what it's called, but it 
 copies all your files from one Mac to another, and new Macs usually 
 offer to do that for you) then you probably won't need to do anything 
 else at all. If Rev asks for your key on launch, your current license 
 key will work because your platform hasn't changed, it's still OS X.
 
 If you are manually moving your files, there are Rev-related files in 
 places other than the Applications folder, so it's probably easier to 
 just download the current version from the web site and install from 
 that. Your own stacks can be copied anywhere you want, of course.
 

Jacque:
Thank you for the information.  I found and copied all the files from my old
computer over my home wi-fi. I appreciate your prompt and thoughtful response.
Do you ever sleep?
Thanks,
Bob


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution