Closed Bug 136156 Opened 23 years ago Closed 22 years ago

system() won't work from .cgi on Windows

Categories

(Bugzilla :: Email Notifications, defect, P3)

2.14.1
x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: macko, Assigned: preed)

References

Details

(Whiteboard: [needed for Win32bz][blocker will fix])

Attachments

(2 files)

Bugzilla 2.14.1, Windows2000, Apache, ActivePerl All the system() calls from .cgi scripts (like system "processmail.pl") will not run anything. If it is run from commandline, everything worked fine. If run from cgi script by the webserver, system() calls just did not execute. Workaround: Besides renaming the perl scripts to .pl and editing .cgi scripts to call them (and editing shebang lines) I needed to put cmd.exe into bugzilla directory and also add "AddHandler cgi-bin .pl" directive into httpd.conf of Apache. I know it is not in fact the bug of Bugzilla but ActivePerl and Apache - but it would save me quite a chunk of time spent debugging if it was written in the documentation.
-> email notifications
Assignee: zach → preed
Component: Installation & Upgrading → Email Notifications
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
The email notifications part of this is essentially being fixed by bug 124174. As for other system calls currently in the codebase, the only relevant ones are doeditparams.cgi's syncshadowdb call and the calls to webdot in showdependencygraph.cgi.
*** Bug 129543 has been marked as a duplicate of this bug. ***
Attached patch patchSplinter Review
This patch add a $pathseparator variable that contain \ or / depending of the OS. this variable is used to construct the path passed to the system function It also add a $systempath variable in the localconfig file to allow system to find the cmd.exe function (you need to run checksetup to create it)(patch from bug 129401).
Attached file syncshadowdb.bat
this batch file allow to call syncshadowdb without renaming it syncshadowdb.pl
*** Bug 159443 has been marked as a duplicate of this bug. ***
Comment on attachment 83017 [details] [diff] [review] patch Use File::Spec->catfile instead. However, we plan to remove system calls anyway by removing processmail/syncshadowdb anyway. The shadowdb has never worked properly on windows, anyway.
Attachment #83017 - Flags: review-
Whiteboard: [wanted for Win32bz]
Whiteboard: [wanted for Win32bz] → [needed for Win32bz]
Blocks: 183753
This is no longer an issue. As of the checkin for bug 124174, Bugzilla no longer makes any system() calls to Perl files.
Status: NEW → RESOLVED
Closed: 22 years ago
Depends on: 124174
Resolution: --- → FIXED
Whiteboard: [needed for Win32bz] → [needed for Win32bz][blocker will fix]
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: