httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Nelson" <pete.nel...@ci.stpaul.mn.us>
Subject Re: [users@httpd] CGI problem running Oracle sqlplus
Date Wed, 08 Jan 2003 15:47:20 GMT
I'm not sure which platform you're working from (Unix/Linux? Win32?), but it looks like you
at least have the oracle client installed, which is a good start.  Try running the following
script from the command line - 
--
#!/usr/bin/perl
use DBI;
use DBD::Oracle;
print "DBD::Oracle loaded Okay.\n";
―

If that prints out the final message, you're ready to go.  If not, try either - 

  For Unix/Linux, as root - 
    perl -MCPAN -e 'install DBD::Oracle' 
    (you MUST have the oracle client installed, and ORACLE_HOME in your env).

  For Win32 (with Administrator rights) - 
    ppm install DBD::Oracle

Once DBD::Oracle is installed, you'll probably want to take a look at http://www.perldoc.com/cpan/DBD/Oracle.html
for info on what you can do with DBD::Oracle.

Good luck!

--
Pete Nelson, Web Developer
<pete.nelson@ci.stpaul.mn.us>
http://www.ci.stpaul.mn.us/


>>> kdubuisson@kcmria.com 01/08/03 09:11AM >>>

Thanks for the response Pete.  To answer your questions, I'm using PERL for my cgi script.
 It calls sqlplus passing in a file for sqlplus to run.  The file contains function/procedure
calls that exist in the database.  Maybe oraperl is the way to go on this; I've never tried
it.  The reason I did it this way was that I knew it worked well from the PERL standpoint
and was hoping the same would exist for cgi.

Any ideas would be very much appreciated. Thanks again,
Kenny
----- Original Message ----- 
From: Pete Nelson 
To: users@httpd.apache.org 
Sent: Wednesday, January 08, 2003 9:07 AM
Subject: Re: [users@httpd] CGI problem running Oracle sqlplus


Some shell-based applications do not like being called from a CGI / server process.  I'm not
sure if that's what's happening here, but I know I have run into that issue with other executable
shells.  Some shells require certain terminal information, which is not available from a CGI.
 Some simply require a lot of overhead and memory, which might (not 100% sure here) cause
the CGI to give up.

But what I'm more curious about is why you're using sqlplus, instead of one of the Oracle
drivers in perl, php, java, etc.  Depending on what you are trying to achieve, there may be
an easier, more efficent way of doing it that would completely avoid the problem you're seeing.
 What language are you using for your CGI?

--
Pete Nelson, Web Developer
<pete.nelson@ci.stpaul.mn.us>
http://www.ci.stpaul.mn.us/


>>> kdubuisson@kcmria.com 01/08/03 08:52AM >>>
I have a cgi script which calls Oracle's sqlplus to run a sql script.  When
I run the cgi script from the command prompt (logged in as the apache user),
the sqlplus call gets executed properly; when I run it from a web page, the
sql script never gets executed...no errors, no anything.  I'm thinking that
this is a permission issue.

Here is what I've tried:  I created a new user named "apache" and I set the
user variable in the httpd.conf to this new user.  I created a profile for
this new user that has the path point to sqlplus.  I then restarted apache
but the problem still exists.

Any ideas on what I'm doing wrong?  Thanks,
Kenny


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Mime
View raw message