Solved

Help with stripping a variable from Apache

Posted on 2001-09-04
2
136 Views
Last Modified: 2010-03-04
Hello,
Can anyone help. I am trying to strip an environment variable from Apache webserver. It is DOCUMENT_ROOT.
Basically I need to get the value of DOCUMENT_ROOT which will be something like /home/username...this will then be used in a cgi script to read a log from the users home directory. There is only one cgi script that is called and it will look up the log from the location that it is called from. ie www.this_example.com equates to /home/xyz
So when the script is called it will look up the log from /home/xyz
Likewise from /home/abc
gets the logs from /home/abc and so on. So the cgi script will refer back to where it is being called from. It will be kept as one single script in a cgi-bin for security reasons.
0
Comment
Question by:j1mlondon
[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
2 Comments
 
LVL 1

Accepted Solution

by:
Zook earned 100 total points
ID: 6463336
If I got your question right, then you don't have a problem. Just use the appropriate Shellvariable in your script. Apache will have set it when you script is called!?

What didn't I get?

cu
Zook
0
 

Author Comment

by:j1mlondon
ID: 6463867
I couldn't get what I wanted using a simple print content type : text/html etc...so how do I get the variable for DOCUMENT_ROOT's value?
I just need to run a diff. script with that value inserted.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

696 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