in reply to Re^5: CGI-SQL Query Issue
in thread CGI-SQL Query Issue

NO, same result as before. That's the whole problem, SQL query is not working.

Replies are listed 'Best First'.
Re^7: CGI-SQL Query Issue
by poj (Abbot) on Mar 18, 2016 at 12:50 UTC

    Create a file called dual.sql in cgi-bin with these 2 lines

    select SYSDATE from dual; exit;

    Create and access this cgi program

    #!/usr/bin/perl use strict; use warnings; use CGI; use CGI::Carp 'fatalsToBrowser'; my $sqlfile = '/var/www/cgi-bin/dual.sql'; my $q = new CGI; my $connstr = 'USER/PASSWORD@DB'; my $msg = qx"sqlplus -s $connstr \@$sqlfile"; print $q->header,$q->start_html, $q->pre($msg),$q->end_html;
    poj
      Hi, When I run this script, with this sql configured, I don't get any result on the web page. SQL does not seem to work. Regards
        And when I run this script from command line, I get proper results..