DBI/DBD connection works in shell, not httpd 
Author Message
 DBI/DBD connection works in shell, not httpd

I know, I know,
this is old as the hlls and twice as dusty but I need another clue.
Yes, I'm looking at the FAQ that is contained in the DBI.pm.
But I'm not sure how to impliment the possible fixes.
Below it the error log.
If I run the script in a shell as root, works great.
If I run it as another user I get the same error in the shell as I do in the
error_log.

The FAQ in DBI.pm suggests configuring the web server to pass env. variable
to the CGI scripts.
The newbie would need some help with this.
mysql in at /usr/local/mysql

Thank you for your mercy and patients,
Don Stefani
~ Newbie at all things Perl / Linux / CGI

------ httpd error_log -----------------------------------

database 'products' at /home/don/public_html/kites/cgi-bin/dbicat.cgi line 6
Can't call method "errstr" on an undefined value at
/home/don/public_html/kites/cgi-bin/dbicat.cgi line 6.

database 'products' at /home/don/public_html/kites/cgi-bin/dbicat.cgi line 6



Sun, 19 Oct 2003 06:50:34 GMT  
 DBI/DBD connection works in shell, not httpd
Just a thought.

Being a different user won't allow you to log onto the database.

So create a user account on the database for the user you want to use.


Quote:
> I know, I know,
> this is old as the hlls and twice as dusty but I need another clue.
> Yes, I'm looking at the FAQ that is contained in the DBI.pm.
> But I'm not sure how to impliment the possible fixes.
> Below it the error log.
> If I run the script in a shell as root, works great.
> If I run it as another user I get the same error in the shell as I do in
the
> error_log.

> The FAQ in DBI.pm suggests configuring the web server to pass env.
variable
> to the CGI scripts.
> The newbie would need some help with this.
> mysql in at /usr/local/mysql

> Thank you for your mercy and patients,
> Don Stefani
> ~ Newbie at all things Perl / Linux / CGI

> ------ httpd error_log -----------------------------------

> database 'products' at /home/don/public_html/kites/cgi-bin/dbicat.cgi line
6
> Can't call method "errstr" on an undefined value at
> /home/don/public_html/kites/cgi-bin/dbicat.cgi line 6.

> database 'products' at /home/don/public_html/kites/cgi-bin/dbicat.cgi line
6



Sun, 19 Oct 2003 14:51:57 GMT  
 DBI/DBD connection works in shell, not httpd

Quote:

> I know, I know,
> this is old as the hlls and twice as dusty but I need another clue.
> Yes, I'm looking at the FAQ that is contained in the DBI.pm.
> But I'm not sure how to impliment the possible fixes.
> Below it the error log.
> If I run the script in a shell as root, works great.
> If I run it as another user I get the same error in the shell as I do in the
> error_log.

> The FAQ in DBI.pm suggests configuring the web server to pass env. variable
> to the CGI scripts.
> The newbie would need some help with this.

You are asking about web server configuration in a Perl newsgroup. Try
the book "Apache" by Peter Wainwright, Wrox Press.

Quote:
> mysql in at /usr/local/mysql

> Thank you for your mercy and patients,

Why don't you post your code? Particularly, the connect statement that
is failing.

You might join www.perlmonks.org. You will get a lot of help there.



Sun, 19 Oct 2003 22:06:34 GMT  
 DBI/DBD connection works in shell, not httpd
To All,

I apologize for posting this in the wrong group.

I just figured since the problem started when I connected via

the DBI/DBD-mysql "modules" that others in this group may have

experienced the same situation.

Later,

Don Stefani



Sun, 19 Oct 2003 22:32:26 GMT  
 DBI/DBD connection works in shell, not httpd


Quote:
> If I run the script in a shell as root, works great.
> If I run it as another user I get the same error in the shell as I do in the
> error_log.

> The FAQ in DBI.pm suggests configuring the web server to pass env. variable
> to the CGI scripts.
> The newbie would need some help with this.
> mysql in at /usr/local/mysql

Since you have proclaimed yourself a newbie, a pinch of advice. First, your
question is essentially about a Web server, which is off-topic in this news
group. A better group would have been comp.infosystems.www.servers.unix.

Second, you should provide complete information in your question. Asking for
"..help with this." Is not quite as specific as asking, "How do I configure
my [specify product, version, operating system, and your mother's maiden
name if you think it might be helpful].

Guessing that you run an Apache server, you set Env. Variables for the Web
server with the SetEnv directive.

Try this link:
http://httpd.apache.org/docs/env.html

cp



Sun, 19 Oct 2003 22:40:39 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. DBI and DBD::Informix - LD_LIBRARY_PATH does not work with suid perl script

2. perl subroutine will not work with NCSA httpd

3. DBI and DBD connection problem

4. DBI+DBD::ODBC+MS Access connection error

5. Oracle8i Connection using PERL DBI and DBD modules on HP Unix

6. Remote connection with DBI/DBD::Sybase

7. multiple connection problems with DBI DBD::Oracle

8. DBD::XBase 'not' not working

9. Apache::DBI-connections apparently not re-used

10. Apache::DBI-connections apparently not re-used

11. DBI dbiproxy and ODBC connection isn't working

12. DBI::shell,dbish,DBD::Proxy Server....

 

 
Powered by phpBB® Forum Software