Re: CGI and Environment Variables

new topic     » goto parent     » topic index » view thread      » older message » newer message

thanks for suggestins.

I have used "shroud - clear" to remove all includes from the program (the're already loaded in) and then put a trace(3) in the cgi program. I also took out all getenv and hard coded their values. I found then what the problem is by using the ctrace.out file it produced.

 
	initODBC() 
 
	dbId = openConnectionODBC(dbName,dbUser,dbPassword) 
 
	if dbId < 1 then 
		--dbId = message_box("Can't open DataBase " & dbName,"",0) 
		abort(1) 
	end if 

I cannot get to the data mysql database using Matt's odbc.e It aborts after not being able to connect.

Here's the tail end of the ctrace.out:

machine.e:288 poke(mem+length(s), 0) Thanks to Aku machine.e:290 return mem cgilib/odbc.ew:1242 a_ptr = allocate_string( authentication ) machine.e:285 mem = allocate(length(s) + 1) machine.e:55 return x >= 1 machine.e:105 return machine_func(M_ALLOC, n) machine.e:286 if mem then machine.e:287 poke(mem, s) machine.e:288 poke(mem+length(s), 0) Thanks to Aku machine.e:290 return mem cgilib/odbc.ew:1244 ok = c_func( SQLConnect, { getHandleODBC(hconn), s_pt cgilib/odbc.ew:971 if id > length( handle_odbc ) or handle_odbc[id] = -1 cgilib/odbc.ew:975 return handle_odbc[id] cgilib/odbc.ew:1248 free( h_ptr ) machine.e:60 return a > 0 and a <= MAX_ADDR and floor(a) = a machine.e:110 machine_proc(M_FREE, a) machine.e:111 end procedure cgilib/odbc.ew:1249 free( s_ptr ) machine.e:60 return a > 0 and a <= MAX_ADDR and floor(a) = a machine.e:110 machine_proc(M_FREE, a) machine.e:111 end procedure cgilib/odbc.ew:1250 free( u_ptr ) machine.e:60 return a > 0 and a <= MAX_ADDR and floor(a) = a machine.e:110 machine_proc(M_FREE, a) machine.e:111 end procedure cgilib/odbc.ew:1251 free( a_ptr ) machine.e:60 return a > 0 and a <= MAX_ADDR and floor(a) = a machine.e:110 machine_proc(M_FREE, a) machine.e:111 end procedure cgilib/odbc.ew:1253 if not SQL_SUCCEEDED( ok ) then cgilib/odbc.ew:924 return (rc = 0) or (rc = 1) cgilib/odbc.ew:1255 return -hconn cgilib/dbfile.e:187 if dbId < 1 then cgilib/dbfile.e:189 abort(1)

THE END

Does anyone know what to do about this? The programs runs without a problem when run from Crimson but when launched from ID it cannot connect to the data base. If I can't solve this my CGI days are over. Hopefully some bright sole knows the answer.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu