?
Solved

.exe call within perl script not executing properly within apache

Posted on 2003-03-16
10
Medium Priority
?
218 Views
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-\"\"
pages/WikiSandbox";


In the log file I get
[Sun Mar 16 10:22:26 2003] [error] [client 10.0.3.134]
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
properly.

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
mple.pl
pages/RCS/WikiSandbox  <--  pages/WikiSandbox
initial revision: 1.1
done

0
Comment
Question by:brettkotch
[X]
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
10 Comments
 
LVL 51

Expert Comment

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

Author Comment

by:brettkotch
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".
0
 

Author Comment

by:brettkotch
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

NameVirtualHost 10.0.3.134: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.
#

<VirtualHost 10.0.3.134:9090>
     ServerName 10.0.3.134:9090
     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
</VirtualHost>



0
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

by:
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"
0
 

Author Comment

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

Seems like this shouldn't be a problem!?
0
 

Author Comment

by:brettkotch
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?

0
 

Author Comment

by:brettkotch
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?
0
 
LVL 51

Expert Comment

by:ahoffmann
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).
0
 

Author Comment

by:brettkotch
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!
0
 
LVL 51

Expert Comment

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

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