CGI Webkit

CGI Webkit

Post by Chad Lait » Sun, 31 Dec 1899 09:00:00



I downloaded the cgi-stuff from Informix.  I made my own little
program.  Everything runs but I do not receive any data from the
database.  I even name my database in the program and tried the
little environment variable stuff.  

Any ideas????

P.S. I tried multiple different select statements.  NONE work over the
web but if I cut and paste them into isql using a telnet session, the
select returns row(s).

Thanks,
Chad Laity

 
 
 

CGI Webkit

Post by Klaus Vormw » Sun, 31 Dec 1899 09:00:00



>I downloaded the cgi-stuff from Informix.  I made my own little
>program.  Everything runs but I do not receive any data from the
>database.  I even name my database in the program and tried the
>little environment variable stuff.  
>Any ideas????

There's not  enough data to be precise but:
1. Look into to logs of your web-server. Maybe you will find some
error messages from the program.
2. Wrap your program into a shell-script that sets the appropriate
environment variables. I tried to use the built-in functions for that,
but that did not work on my system. If your system uses dynamic
linking, you have to set the path to your libraries or your program
will not run at all.
3. Debug your program with the errorlog function. If your
SQL-statements work, it does not mean, that the whole program is
bug-free.

Greetings, Klaus

 
 
 

CGI Webkit

Post by Chad Lait » Sun, 31 Dec 1899 09:00:00


Thanks for your help.  I finally found the problem.  Everything ran fine
although my sql_stmts were not returning values.  Turns out that my
httpd server accesses the database as a specific user.  That user did
not have connect privileges to the database (rookie mistake).



> >I downloaded the cgi-stuff from Informix.  I made my own little
> >program.  Everything runs but I do not receive any data from the
> >database.  I even name my database in the program and tried the
> >little environment variable stuff.

> >Any ideas????

> There's not  enough data to be precise but:
> 1. Look into to logs of your web-server. Maybe you will find some
> error messages from the program.
> 2. Wrap your program into a shell-script that sets the appropriate
> environment variables. I tried to use the built-in functions for that,
> but that did not work on my system. If your system uses dynamic
> linking, you have to set the path to your libraries or your program
> will not run at all.
> 3. Debug your program with the errorlog function. If your
> SQL-statements work, it does not mean, that the whole program is
> bug-free.

> Greetings, Klaus

 
 
 

CGI Webkit

Post by W Mat Wait » Sun, 31 Dec 1899 09:00:00



>>I downloaded the cgi-stuff from Informix.  I made my own little
>>program.  Everything runs but I do not receive any data from the
>>database.  I even name my database in the program and tried the
>>little environment variable stuff.  

>>Any ideas????

What userid is the web server running the cgi as?
Does that user even have connect privileges?

I agree that you need to get the errorlog going first.

Mat

--

GAMBRO Healthcare Patient Services      | (615) 320-4410
Nashville, TN                           |

 
 
 

CGI Webkit

Post by Chad Lait » Sun, 31 Dec 1899 09:00:00




> >>I downloaded the cgi-stuff from Informix.  I made my own little
> >>program.  Everything runs but I do not receive any data from the
> >>database.  I even name my database in the program and tried the
> >>little environment variable stuff.

> >>Any ideas????

> What userid is the web server running the cgi as?
> Does that user even have connect privileges?

> I agree that you need to get the errorlog going first.

> Mat

> --

> GAMBRO Healthcare Patient Services      | (615) 320-4410
> Nashville, TN                           |

Thanks for the help.  I realized that the httpd server was running as a
different user than what I had thought.  You are correct,  that user had
no connect privs. to the database.

Chad Laity