LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2007, 04:11 PM   #1
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Connecting perl/apache to db2


I've had apache and perl installed and running successfully for a while. I have successfully run perl scripts in apache and that is working fine. Now I want to connect my perl script to a db2 database on a remote machine. I don't know if its important or not, but I am running apache with suexec so it runs as the user "web" for my particular virtualhost.

I have installed the db2 client software. I have created a perl script that will test my connection to db2. I have added my db2 database information to the local catalog.

I have run my perl script at the command line and it connects to the db2 database and returns information that I know is stored in the database. Now the final step is getting my script to run in the browser. Running the same script in the browser gives me the following in my error logs...

[Wed Feb 28 15:08:20 2007] [error] [client 192.163.11.167] DBI connect('UDBTEST','user',...) failed: Total Environment allocation failure! Did you set up your DB2 client environment? at /home/web/www/pacmantest.pl line 6
[Wed Feb 28 15:08:20 2007] [error] [client 192.163.11.167] Couldn't connect to database: Total Environment allocation failure! Did you set up your DB2 client environment? at /home/web/www/pacmantest.pl line 6.
[Wed Feb 28 15:08:20 2007] [error] [client 192.163.11.167] Premature end of script headers: pacmantest.pl

I believe this error is trying to tell me that it cannot find the db2 client.

I have also tried disabling suexec (by commenting out the line beginning with SuexecUserGroup in my config file.) The error log still reports the same error.

I feel like I'm really close here. Can someone help me cross the last hurdle?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with perl module for w3c validator to work on my local Apache+PHP+perl instal tbamt Linux - Software 0 12-16-2004 05:37 PM
Perl > connecting to databases Elijah Programming 4 06-18-2004 08:47 AM
chrooting apache v2 (php, ssl, perl support) ; perl configuration markus1982 Linux - Security 3 01-26-2003 06:15 PM
connecting from Linux to MS SQL using perl DBI->connect Aniket Linux - Software 0 08-08-2002 05:42 PM
can i set ~/public_html/perl as a perl directory for apache? doublefailure Linux - Networking 1 07-09-2002 04:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration