
pappusingh
New User
Dec 29, 2008, 1:23 AM
Post #3 of 4
(5334 views)
|
hi.. I am trying to execute this in perl so when I click a link on my site it calls the cgi script and collects environment variables. Then I enter some information in the database. I don't think its because of permissions because I have another script which uses another java file to insert data in database!! and that works. this part of code calls the java program log.java system( "/usr/bin/java log '$DAY' '$TIME' '$FROM_URL' '$QUERY' '$REMOTE_IP' '$SERVER_PROTOCOL' '$GATEWAY_INTERFACE'"); which enters the values in the database as follows String query = "insert into log( REQUEST_ID, DAY, TIME, FROM_URL, TO_URL, REMOTE_IP, SERVER_PROTOCOL, GATEWAY_INTERFACE) values (log_seq.nextval, '"+args[0]+"','"+args[1]+"', '"+args[2]+"', '"+args[3]+"', '"+args[4]+"', '"+args[5]+"','"+args[6]+"')"; REQUEST_ID is the primary key and auto increment. all other fields are of type varchar. none of them except primary key is NOT NULL. and to be specific for first couple of times when I call the cgi script some fields for example $FROM_URL will be passing NULL. Does that creating a problem ?
|