For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > March 2004 > Perl CGI ODCB environment problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Perl CGI ODCB environment problem
Steve V

2004-03-18, 6:46 pm

Hi,

I'm running Active Perl 5.6.1 and apache 1.3 on Windows XP
in an application that is using an Access database via the ODBC
provided in this version of Perl in a CGI script.
The whole application was working fine until the disk became corrupted.

I moved everything over to another XP machine and everything works
fine except I get a 911 error when trying to open the Access database.
However, if I run the same Perl commands in a perl script outside of
Apache, I can retrieve data from Access without a problem.
So obviously Perl and ODBC are fine. Sounds like an environment
problem, huh?

So I look at the environment variables in apache and the standalone
Perl script -- they're different.

Apache:

PATH="C:\WINDOWS\system32;C:\WINDOWS; (and a bunch of other stuff)"

Perl standalone:

PATH="C:\win32app\perl\bin\;.;C:\WINDOWS\system32;C:\WINDOWS; (and
the same bunch of other stuff)

The latter matches the PATH environment variable available via the
windows Properties interface on My Computer.

So perhaps the ODBC module somehow needs PERL in the path to work?
I tried putting SetEnv PATH C:\win32app\perl\bin... in http.conf
in Apache, but it won't let me override the path setting
(e.g., I can set a fake PATHZ, but I can't set just PATH).

I notice when I run Perl/Apache on an NT system, PATH is set to
include Perl, as I would have expected.

Or perhaps that's all a red herring and it has nothing to do with
the PATH -- it is some permission problem? I get the same problem
either running as Owner or as a particular user, and restarting
Apache as either user (and USERNAME is never returned on any
machine via apache Perl CGI environment displays).

Any ideas?

Thanks,

Steve
svinter@excite.com




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com