Closed Bug 221693 Opened 21 years ago Closed 20 years ago

When installing bugzilla for Windows, the first line of the CGI files needs to be changed to use Windows Perl

Categories

(Bugzilla :: Documentation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 239852

People

(Reporter: wouter.de.vaal, Assigned: glob)

Details

(Whiteboard: [needed for Win32bz])

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: The Bugzilla Guide - 2.17.4 Development Release

When one installs bugzilla in a windows environment, the following step is not 
documented:

All cgi files need to have the first line replaced:
Change these lines:
#!/usr/bin/perl -w

To something like this:
#!d:\perl\bin\perl.exe


The following error will occur in the apache log if you don't fix this:
[Thu Oct 09 15:45:28 2003] [error] [client 127.0.0.1] (OS 3)The system cannot 
find the path specified.  : couldn't create child process: 720003: index.cgi
[Thu Oct 09 15:45:28 2003] [error] [client 127.0.0.1] (OS 3)The system cannot 
find the path specified.  : couldn't spawn child process: D:/bugzilla-
2.17.4/index.cgi

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
http://www.bugzilla.org/docs216/html/win32.html :

4.3.1. Win32 Installation: Step-by-step

Step 12:

>> Modify the path to perl on the first line (#!) of all files to point to your
Perl installation, and add "perl"  to the beginning of all Perl system calls
that use a perl script as an argument. This may take you a while. There is a
"setperl.csh"  utility to speed part of this procedure, available in the Useful
Patches and Utilities for Bugzilla  section of The Bugzilla Guide. However, it
requires the Cygwin GNU-compatible environment for Win32 be set up in order to
work. See http://www.cygwin.com/  for details on obtaining Cygwin. <<

--> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
OS: Windows 2000 → All
Hardware: PC → All
Resolution: --- → INVALID
Ok, that's in the manual for bugzilla  2.16.3. But it also says at the top "You 
are almost certainly better off getting the 2.17 version from CVS", so I did 
that and used the manuals from the development tree:

http://www.bugzilla.org/docs/html/os-specific.html

and there's nothing about it in there. 

So if you don't want to update the development manual, fine, but at least give 
a pointer to the 2.16.3 documentation, that those steps are still in order..
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
On the tip docs, that's covered here:

http://www.bugzilla.org/docs/html/faq.html#faq-general-perlpath

However, the command-line given there won't work on Windows unless you have cygwin.
Status: UNCONFIRMED → NEW
Ever confirmed: true
MySQL comes with a binary called "replace" which will do the job on Windows...

C:\mysql\bin\replace "#!/usr/bin/perl" "#!C:\perl\bin\perl" -- *.cgi *.pl
Jake is leaving for a while (Reserve unit got called up), and we don't have a
new docs owner yet.  Anyone interested in helping out, please add
documentation@bugzilla.org to your watch list in your email preferences in Bugzilla.
Assignee: jake → documentation
Preliminarily moving all docs bugs to 2.18, we should make a valiant attempt to
have the docs as up-to-date as possible when 2.18 releases.
Target Milestone: --- → Bugzilla 2.18
acutally you can get away without modifying the #! line.

if bugzilla is installed on drive c, apache will look for c:\usr\bin\perl.exe.

copy just your existing perl.exe to that location, and when perl.exe starts up,
it will locate the real perl installation directory via the registry.

Whiteboard: [needed for Win32bz]
if you're running apache, you can use the "ScriptInterpreterSource" directive.

however i recommend you only use "ScriptInterpreterSource Registry-Strict" which
was introduced with apache2.

basically, add 

  ScriptInterpreterSource Registry-Strict

to the Directory or VirtualHost block, and create a registry key

  HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command

with a default value of the full path to perl plus -T .. 

  c:\perl\bin\perl.exe -T

Notes I made while installing Bugzilla 18r1 on Windows 2000 Server, IIS5 Web 
server
------------
Modified bugzilla\index.cgi

1st line was: #!/usr/bin/perl -wT
	changed to: ##/usr/bin/perl -wT
This removed the call to perl
--- Changed this back, would have needed to change all perl scripts -- not a 
solution
--- See below on solution with the IIS setup.

HKEY_LOCAL_MACHINE
  System,
    CurrentControlSet
      Services, 
        W3svc, 
          Parameters, 
            ScriptMap --> Add String:
              .pl:	REG_SZ:		c:\Programs\perl\bin\perl.exe "%s" "%s"

HKEY_CLASSES_ROOT
  .cgi
    SHELL
    	ExecCGI
    	  Command
    	    (Default):		REG_SZ:	
	c:\Programs\perl\bin\perl.exe %s %s
    	    
    	    


Removed:
	HKEY_LOCAL_MACHINE
	HKEY_CLASSES_ROOT
and found that it didn't make any difference

Searched on the web, found other people had similar problems on the Mac OS-X

Finally changed in the IIS Manager's Default Web Site's bugzilla properties:
  Configuration
  	App Mappings
  	  .cgi: 
  	    C:\Programs\Perl\bin\perl.exe -T %s %s
  	    All Verbs
  	  .pl: 
  	    C:\Programs\Perl\bin\perl.exe -T %s %s
Attached patch update windows documentation (obsolete) — Splinter Review
Assignee: documentation → bugzilla
Status: NEW → ASSIGNED
you can view the html for this patch at
http://landfill.bugzilla.org/globdoc/os-specific.html
Attachment #159450 - Flags: review?
Comment on attachment 159450 [details] [diff] [review]
update windows documentation

>>           <title>Configuring IIS</title>
>> 
>>           <para>To configure IIS to run Bugzilla, you need to add an Application
>>           Mapping for the .pl extension:
>>           </para>

I didn't know any of the .pl files were supposed to be executable from the web
server?  Did you mean .cgi here?
Comment on attachment 159450 [details] [diff] [review]
update windows documentation

oops
Attachment #159450 - Attachment is obsolete: true
Attachment #159450 - Flags: review?
Attached patch update windows documentation v2 (obsolete) — Splinter Review
fixes .pl / .cgi oops
Attachment #159454 - Flags: review?
Attachment #159454 - Flags: review?
Attached patch update windows documentation v3 (obsolete) — Splinter Review
change ppm repository to landfull's
Attachment #159454 - Attachment is obsolete: true
Attachment #160217 - Flags: review?
Summary: When installing bugzilla for windows, the first line of the cgi files needs to be changed to use windows perl → When installing bugzilla for Windows, the first line of the CGI files needs to be changed to use Windows Perl
In order to avoid fetching two pages, it's useful to link directly to the final
URL destination instead of linking to a redirect.

I've noticed that URLs in this patch tend to get a redirect code when downloaded
with wget. I think adding a trailing slash to them would solve the problem. This
seems to be the case for http://landfill.bugzilla.org/ppm and
http://glob.com.au/sendmail (adding a trailing slash solves the issue).

The third patch includes a diff for enabling support of different minimum
version of Perl, depending on the current platform (Windows or not Windows).
This conflicts with the current bug summary.
Attachment #160217 - Flags: review?
this diff is against 2.18-branch instead of 2.18-rc2 (oops)
Attachment #160217 - Attachment is obsolete: true
fixed by bug 239852

*** This bug has been marked as a duplicate of 239852 ***
Status: ASSIGNED → RESOLVED
Closed: 21 years ago20 years ago
Resolution: --- → DUPLICATE
clearing target of DUPLICATE/WONTFIX/INVALID/WORKSFORME so they'll show up as
untriaged if they get reopened.
Target Milestone: Bugzilla 2.18 → ---
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: