.exe call within perl script not executing properly within apache

Posted on 2003-03-16
Medium Priority
Last Modified: 2010-08-05
I have a fairly simple script that is supposed to run rcs's ci ... but
the files are never created.

The perl script is

print "Content-type: text/html\n\n";
system "/progra~1/rcs/bin/win32/ci.exe",  "-l -t-\"\"

In the log file I get
[Sun Mar 16 10:22:26 2003] [error] [client]
pages/RCS/WikiSandbox  <--  pages/WikiSandbox

but no file is actually created.

I have my apache server set up as a virtual host and the perl script
which runs this command runs fine, its just this command doesn't run

When I run this script from the command line in the cgi-bin directory
it works perfectly ... the output from the command line is shown below ...

C:\Documents and Settings\bkotch\My Documents\Personal
Wiki\cgi-bin>perl saveExa
pages/RCS/WikiSandbox  <--  pages/WikiSandbox
initial revision: 1.1

Question by:brettkotch
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 51

Expert Comment

ID: 8150991
does the web-server user hav permissions to write in the pages/RCS/WikiSandbox and pages/WikiSandbox directory?

Author Comment

ID: 8152124
Hmmm. I don't know the answer but I can offer my configuration. The server starts as a service with the "Log On As" set to "Local System".

Author Comment

ID: 8152551
From the config point of view, I have basically made no changes to httpd except for adding the following virtual host ...

# Use name-based virtual hosting.
#NameVirtualHost *

Listen 9090


# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.

     DocumentRoot "/Documents and Settings/bkotch/My Documents/Personal Wiki/"
     ScriptAlias /cgi-bin/ "/Documents and Settings/bkotch/My Documents/Personal Wiki/cgi-bin/"
     ErrorLog "C:\Documents and Settings\bkotch\My Documents\Personal Wiki\errorlog"
     CustomLog "C:\Documents and Settings\bkotch\My Documents\Personal Wiki\customlog" custom

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

LVL 51

Accepted Solution

ahoffmann earned 2000 total points
ID: 8154063
check with xcacls.exe if the directory can be access/written by the user you have specified in "Log on as"

Author Comment

ID: 8156754
c:\Documents and Settings\bkotch\My Documents\Personal Wiki LNHOLDINGS\bkotch:F
                                                            NT AUTHORITY\SYSTEM:F
                                                            NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F

Seems like this shouldn't be a problem!?

Author Comment

ID: 8157313
OK, I just realized that when I run apache not as a service the script works properly. When I run apache as a service, it doesn't work properly. So I guess the question is how can I run apache as a service and still get the same functionality? IS that with xcacls? and if it is ... how so?


Author Comment

ID: 8157381
change the service from local system to myself ... that seemed to work!? does that make sense? and is that the preferred way of doing it?
LVL 51

Expert Comment

ID: 8158241
I resigned from any M$ products years ago, so cannot give valuable hints about "what's best".
But as I said before, just give the user you use as "Log on as" read and execute permissions on the necessary directories and files. xcacls.exe can do this too (take care, it's tricky to use).

Author Comment

ID: 8158640
Although this answer wasn't exactly what I would up implementing, the answer was critical in me solving the problem. In the end, I just changed the log on as person from system to myself so I don't need to deal with the whole directory permission thing ... Thanks!
LVL 51

Expert Comment

ID: 8159106
there're always sevaral ways to do it, even with M$ ;-)
Thanks, and happy sufin'

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question