CGI access to PostGreSQL
Frank D. Engel, Jr.
fde101 at fjrhome.net
Fri Feb 18 13:39:37 EST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Are you running 2.5? You might want to look at (vote for?) bug 2247.
On Feb 18, 2005, at 12:45 PM, Sivakatirswami wrote:
> Aloha, Mark:
>
> Still no go on Linux as a CGI...--
>
> fixed the case as you said to:
>
> dbPostgresql.so
>
> one of our team put the file in
> "/usr/local/lib/revolution/dbPostgresql.so "
>
> and tried to run this script from the cmd line shell as root but it
> didn't work
>
> And I also tried putting it in the cgi bin of the virtual site where
> it will eventually be used... still didn't work
>
> I also tried a full path from root to the cgi bin of the virtual site
>
> it still fails. Not sure how to trouble shoot this one..I mean we
> *can* do it by issuing SQL in shell commands but it would be much
> better if we can use rev's dictionary then I can repurpose code that
> is in thin rev clients for re-use in cgi's.
>
> #!/usr/local/bin/revolution
>
> on startup
> ## revSetDatabaseDriverPath
> "/usr/local/lib/revolution/dbPostgresql.so"
> ## revSetDatabaseDriverPath
> "/home/virtual/site1/fst/var/www/cgi-bin/dbPostgresql.so"
> revSetDatabaseDriverPath "dbPostgresql.so"
> put
> revOpenDatabase("Postgresql","69.94.64.57","cybertalks","user","passwor
> d") into pConnectionID
> if (pConnectionID) is a number then
> put "Your Cybertalks data base opened successfully with connection
> ID " into tResult
> put pConnectionID after tResult
> put tResult into buffer
> else
> put "Gosh darn, what's up? The data base connection failed." into
> buffer
> end if
>
> put "Content-Type: text/plain" & cr
> put "Content-Length:" && the length of buffer & cr & cr
> put buffer
>
> end startup
>
> this works fine from inside the IDE on OSX:
>
> revSetDatabaseDriverPath "dbPostgresql.so"
> put
> revOpenDatabase("Postgresql","69.94.64.57","cybertalks","user","passwor
> d") into pConnectionID
> if (pConnectionID) is a number then
> put "Your Cybertalks data base opened successfully with connection
> ID " into tResult
> put pConnectionID after tResult
> put tResult
> else
> put "Gosh darn, what's up? The data base connection failed."
> end if
>
> We must still be missing something.
>
>
> Sivakatirswami
>
>
> On Feb 10, 2005, at 12:05 AM, Mark Waddingham wrote:
>
>> The Revolution 2.5 (and up) Linux engine has both revXML and revDB
>> embedded within it, so the externals are not necessary. However, the
>> database drivers themselves are not embedded and you need to tell the
>> engine where to find them by doing:
>> revdb_setdriverpath <path_to_drivers>
>> (or revSetDatabaseDriverPath <path_to_drivers>)
>> Where <path_to_drivers> is the directory containing the drivers. Also,
>> Linux paths are case-sensitive so make sure that the value you pass
>> for
>> the database type looks the same as the driver file:
>> i.e. if you pass "mysql" the engine will look for dbmysql.so
>> if you pass "MySQL" the engine will look for dbMySQL.so
>>
>> Warmest Regards,
>>
>> Mark.
> _______________________________________________
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
- -----------------------------------------------------------
Frank D. Engel, Jr. <fde101 at fjrhome.net>
$ ln -s /usr/share/kjvbible /usr/manual
$ true | cat /usr/manual | grep "John 3:16"
John 3:16 For God so loved the world, that he gave his only begotten
Son, that whosoever believeth in him should not perish, but have
everlasting life.
$
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFCFjZp7aqtWrR9cZoRAipRAJ9VmarDpfwAke8DpdjTtob6t+ixWQCfcqNe
PdtOZ0mV5P5xXadhJ0UPpaU=
=DcAW
-----END PGP SIGNATURE-----
___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the use-livecode
mailing list