LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Connecting perl/apache to db2 (https://www.linuxquestions.org/questions/programming-9/connecting-perl-apache-to-db2-533378/)

Donboy 02-28-2007 04:11 PM

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?


All times are GMT -5. The time now is 04:35 AM.