CGI database connection (mySQL)

SparkOut SparkOutYNY at gmail.com
Wed Feb 18 10:38:09 EST 2009


Can anyone help?
I have built a web-application by creating the logic for each cgi process in
the Rev IDE, using cards and buttons to call the scripts.
I use Trevor DeVore's libDatabase (v. 2.1) to handle the database connection
and queries.
Everything works fine in the IDE version.
Now I'm converting the application to the web (nice and simple, replacing
the dynamic parts of the page on the fly by filling in the content on a
template page and outputting via Andre's Rockets.cgi) and everything is
working OK, except the database connection.
The Trevor's library is being called OK, the libdb_registerDatabase
initialisation has no trouble, but when it comes to the libdb_connect call,
it fails. A 500 internal server error is generated, and the logs show
"Premature end of script headers". I have also tried with a revOpenDatabase
call and the same error results.
I have tried using both a standard user (mySQL 5) password and an old style
user password with no success.
My test environment is a WAMP configuration (Uniform Server) on Windows with
Apache/MySQL/PHP. Everything cgi works OK in this setup apart from the
database connection. The live setup will be a Linux webhost, but I have to
get it all configured on my test version setup and demonstrate it's working
before I can turn it live.
Any ideas how to fix this DB connection? Being a windows setup, I've copied
the revdb.dll and dbmysql.dll files into the local cgi folder, and tried
various permutations of the Externals folder, and in the cgi stack I've
tried using revSetDatabaseDriverPath for each of the appropriate trials.
Still can't get past the internal server error.
Any ideas for a solution gratefully received.
-- 
View this message in context: http://www.nabble.com/CGI-database-connection-%28mySQL%29-tp22081311p22081311.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list