Open
Bug 1495832
Opened 8 years ago
Updated 8 years ago
CGI Files Contain Linux Perl Executable Path
Categories
(Bugzilla :: Documentation, defect)
Tracking
()
REOPENED
People
(Reporter: dtekunoff, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Steps to reproduce:
Installed bugzilla on Windows following the documentation at https://bugzilla.readthedocs.io/en/5.0/installing/index.html
Actual results:
All the .cgi and .pl files started with "#!/usr/bin/perl" which caused the Perl scripts to not run on Windows.
Expected results:
There should be some utility script to bulk-replace this line in all .cgi and .pl files with "#!C:/Strawberry/perl/bin/perl" (or alternate path) for Windows users.
Comment 1•8 years ago
|
||
Which web server are you using? The document you pointed at specifically covers this for both IIS and Apache
Apache: See point #2 on https://bugzilla.readthedocs.io/en/5.0/installing/apache-windows.html#installing
IIS: https://bugzilla.readthedocs.io/en/5.0/installing/iis.html#add-handler-mappings
If you're using a different webserver (or know a good way to make that more obvious in the docs), reopen this and let us know which.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
Thank you for your response :) I am using Apache.
Point #2 reads as follows:
"Uncomment AddHandler cgi-script .cgi to register .cgi files as CGI scripts. For this handler to work, you must create a key in the Windows registry named HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command with the default value pointing to the full path of perl.exe with a -T parameter. For example C:\Perl\bin\perl.exe -T if you use ActivePerl, or C:\Strawberry\perl\bin\perl.exe -T if you use Strawberry Perl."
However, the above section is referring to setting up Perl as a CGI handler on Apache. That part was clear and well-explained. Later on in the installation I was still running into issues. After some Google searching I found out that every single CGI and PL file in Bugzilla has a default Perl interpreter set by starting each file with the following line:
#!/usr/bin/perl -T
That would typically be a great Perl interpreter path--on Linux. On Windows, my issue was fixed by changing this line on each and every file to:
#!C:/Strawberry/perl/bin/perl.exe -T
My suggestion is to explain this in the documentation and/or to provide some kind of Perl script to change these file headers. There are a lot of files that end up needing to be changed (>75), and I am concerned that this could be a barrier to other Windows users using this awesome software :)
Comment 3•8 years ago
|
||
In theory that's what the registry key was supposed to fix. Apache supposedly uses that registry key to override the interpreter used when running the cgi files. If that's not working anymore, then we probably do need to update docs....
You know what, I made a mistake. I created the final "Command" registry setting as a string value instead of creating "Command" as a key and setting the "Default" value. I sincerely apologize for wasting your time.
Comment 5•8 years ago
|
||
No worries, it happens. :-) Thanks for making us think about it.
Comment 6•8 years ago
|
||
To continue the thought though, would there be a better way to explain how to set that registry key so someone else doesn't make the same mistake?
This was mainly caused by me reading things too quickly. But I suppose the following could be rephrased:
From:
create a key in the Windows registry named HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command with the default value pointing to the full path of perl.exe with a -T parameter
To:
create a key in the Windows registry named HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command and set the "Default" value to the full path of perl.exe with a -T parameter
Updated•8 years ago
|
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
Updated•8 years ago
|
Assignee: general → documentation
Component: Bugzilla-General → Documentation
You need to log in
before you can comment on or make changes to this bug.
Description
•