Closed Bug 271610 Opened 20 years ago Closed 20 years ago

"Can't locate Bugzilla/Constants.pm in @INC ..." when run index.cgi from apache

Categories

(Bugzilla :: Installation & Upgrading, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: a.zhao, Assigned: zach)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)

After configure a bugzilla 2.18rc3 using RH Linux 7.3/mysql 4.0.22/perl
5.8.5/apache 2.0.52, the checksetup.pl went ok. But the index.cgi can only be
run from command line. If index.cgi is invoked from apache, the error log shows
these lines:

[Wed Nov 24 14:59:40 2004] [error] [client 192.168.100.40] Can't locate
Bugzilla/Constants.pm in @INC (@INC contains: .
/usr/local/lib/perl5/5.8.5/i686-linux /usr/local/lib/perl5/5.8.5
/usr/local/lib/perl5/site_perl/5.8.5/i686-linux
/usr/local/lib/perl5/site_perl/5.8.5 /usr/local/lib/perl5/site_perl) at
/usr/local/apache2/htdocs/bugzilla/index.cgi line 40.
[Wed Nov 24 14:59:40 2004] [error] [client 192.168.100.40] BEGIN
failed--compilation aborted at /usr/local/apache2/htdocs/bugzilla/index.cgi line 40.
[Wed Nov 24 14:59:40 2004] [error] [client 192.168.100.40] Premature end of
script headers: index.cgi

The line 40 of index.cgi is "use Bugzilla::Constants.pm". Aparently, under the
apache environment, the "use lib '.'" failed to do the trick. 

Is this a problem of apache or perl?

Reproducible: Always
Steps to Reproduce:
1.Compile and install the apache 2.0.52 to /usr/local/apache2
2.Install the mysql 4.0.22 (bin dist) and configure it according the bugzilla
manual.
3.Compile and install perl 5.8.5, install at /usr/local, but make a symbolic
link to /usr/bin/perl. Install all recommended modules according to manual
4.install bugzilla under /usr/local/apache/htdocs/, and modify the conf file
accordingly.
5.run checksetup.pl:
[root@prometheus bugzilla]# ./checksetup.pl

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.56
Checking for             CGI (v2.93)   ok: found v3.05
Checking for    Data::Dumper (any)     ok: found v2.121
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.36)   ok: found v1.45
Checking for      DBD::mysql (v2.1010) ok: found v2.9004
Checking for      File::Spec (v0.82)   ok: found v3.01
Checking for      File::Temp (any)     ok: found v0.14
Checking for        Template (v2.08)   ok: found v2.14
Checking for      Text::Wrap (v2001.0131) ok: found v2001.0929

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v2.17
Checking for     Chart::Base (v1.0)    ok: found v2.3
Checking for     XML::Parser (any)     ok: found v2.34
Checking for       GD::Graph (any)     ok: found v1.43
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (v0.9.4)  ok: found v0.9.5

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Checking for    MySQL Server (v3.23.41) ok: found v4.0.22-standard

Populating duplicates table...



Actual Results:  
observing $(APACHE)/logs/error_log while try to access
http://localhost/bugzilla/index.cgi. This will produce the reported error. But
running index.cgi directly from command line produce expected html codes.
The reported problem is a result of running checksetup.pl as root, which
basically modify all bugzilla attributes (owned by root, and rwx permision). 

The easiest fix is the chown -R nobody $(BUGZILLADIR) where nobody is the apache
daemon's process owner.

Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.