Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: embeded php

From: gjones05:mail:orion at: 7-Feb-2001 13:48

Michal Kracik wrote:
> I thought that web servers do not interpret CGI-generated output once > again with another interpreter. Does this code actually work in Apache? > That would kind of solve MySQL database inaccessibility from REBOL!
and later wrote:
> Yes, the method of generating PHP code and then running it is suggested > in the REBOL for Dummies book. But I want the resulting page (generated > from SQL SELECT statement) to be unique for each user that accesses my > web site at the same time. I cannot just write a dynamic page to a file, > redirect to it and hope that some other user of the web site is not > doing the same thing just now. > > I agree that pre-generating "static" PHP scripts from REBOL could be > easier than writing them completely in PHP, I've done that for > ASP/VBScript before.
Hi, Michal, Set-up a PHP page that dynamically manages the database access. If the result of the MySQL query is short, it could be passed as a GET query string to a URL for a REBOL script. The pass could be done by one of the several methods of redirection under PHP. If the query result is long, then the result is written to a temporary page whose file name is unique. Then this page's file name is passed/redirected to the REBOL script. The REBOL script processes the results in the temporary file and then deletes temporary file. Since occasionally searches are aborted, orphaned temporary files may accumulate, so then you run a clean-up script once a day or week to clean these out. I have accomplished this approach in other languages, so it should work. But, I haven't actually set this up as a specific experiment using REBOL. Hope this helps. Regards, --Scott