Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

virtual(3) [php man page]

VIRTUAL(3)								 1								VIRTUAL(3)

virtual - Perform an Apache sub-request

SYNOPSIS
bool virtual (string $filename) DESCRIPTION
virtual(3) is an Apache-specific function which is similar to <!--#include virtual...--> in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-Type header. To run the sub-request, all buffers are terminated and flushed to the browser, pending headers are sent too. This function is supported when PHP is installed as an Apache module or by the NSAPI server module in Netscape/iPlanet/SunONE webservers. PARAMETERS
o $filename - The file that the virtual command will be performed on. RETURN VALUES
Performs the virtual command on success, or returns FALSE on failure. EXAMPLES
See apache_note(3) for an example. NOTES
Warning The query string can be passed to the included file but $_GET is copied from the parent script and only $_SERVER['QUERY_STRING'] is filled with the passed query string. The query string may only be passed when using Apache 2. The requested file will not be listed in the Apache access log. Note Environment variables set in the requested file are not visible to the calling script. Note This function may be used on PHP files. However, it is typically better to use include(3) or require(3) for PHP files. SEE ALSO
apache_note(3). PHP Documentation Group VIRTUAL(3)

Check Out this Related Man Page

NSAPI_REQUEST_HEADERS(3)						 1						  NSAPI_REQUEST_HEADERS(3)

nsapi_request_headers - Fetch all HTTP request headers

SYNOPSIS
array nsapi_request_headers (void ) DESCRIPTION
nsapi_request_headers(3) gets all the HTTP headers in the current request. This is only supported when PHP runs as a NSAPI module. Note Prior to PHP 4.3.3, getallheaders(3) was only available for the Apache servers. After PHP 4.3.3, getallheaders(3) is an alias for nsapi_request_headers(3) if you use the NSAPI module. Note You can also get at the value of the common CGI variables by reading them from the $_SERVER superglobal, which works whether or not you are using PHP as a NSAPI module. RETURN VALUES
Returns an associative array with all the HTTP headers. EXAMPLES
Example #1 nsapi_request_headers(3) example <?php $headers = nsapi_request_headers(); foreach ($headers as $header => $value) { echo "$header: $value <br /> "; } ?> PHP Documentation Group NSAPI_REQUEST_HEADERS(3)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Nmap PHP FE

Hi everyone! I've temporarily come out of hibernation (and will be gone for about two weeks after this post too) to ask for input on a small PHP script I have just completed. The script aims to be a remote front-end for Nmap - now for the safety of this post, I ask that any replies refrain from... (6 Replies)
Discussion started by: Karma
6 Replies

2. UNIX for Dummies Questions & Answers

server variables in bash scripting

are they any server variables in bash/SSH scripting as is in PHP or Perl, for example in PHP: $_SERVER or $_SERVER I'm trying to retrieve the absolute path of an .SH script I'm running thank you (6 Replies)
Discussion started by: basher400
6 Replies

3. Shell Programming and Scripting

formating output

I have a file proc.txt which contains the below one. Content-type: text/html <H2>No query</H2> infodba-marabou:/tmp => export QUERY_STRING="IMAN_server_report=full" infodba-marabou:/tmp => $IMAN_ROOT/web/htdocs/cgi-bin/iman > /tmp/proc.txt infodba-marabou:/tmp => cat proc.txt... (20 Replies)
Discussion started by: Krrishv
20 Replies

4. AIX

PHP,Apache on AIX machine

I have done charts in PHP with following environment; 1) PHP 5.2.x 2) Webserver Apache 2.2.4 or higher 3) Perl 5.8.7 4) GD 2.0.1 5) JPgraph 2.1.1 It works fine in Windowx XP, Red hat linux 3.x.Now I need to move this PHP programs to AIX machine which has following environment: PHP 4.0.6... (6 Replies)
Discussion started by: kumarangopi
6 Replies

5. Shell Programming and Scripting

what's wrong with my bash script?

hi, please point out what's wrong with my script. im feeding it a list containing fqdn, sit should ssh into each and verify that atleast one of its virtual backup ip resolves into one of its virtual hostnames .. anyway the objective shows in the script... however, im having problems in the ... (4 Replies)
Discussion started by: ikk
4 Replies

6. UNIX for Advanced & Expert Users

Using a request script

I am creating a package(Solaris10 on sparc) that needs user input. As I understand it, I need to use a request script. My problem is that the value I set in my request script is not visible in my postinstall script. Not sure if I am doing it right. Here is an example request script... (4 Replies)
Discussion started by: Tornado
4 Replies

7. UNIX for Dummies Questions & Answers

Apache causing CPU to spike when POSTing

Hello all. I've built a SAMP server on Solaris 10 using Apache 2.2.9 and PHP 5.2.6 For the most part everything seems to be working except when I post form data, Apache causes the CPU to max out. Sometimes the script will complete about 40 seconds later. Other times I have to stop Apache to get... (4 Replies)
Discussion started by: RobertSubnet
4 Replies

8. UNIX for Dummies Questions & Answers

insturction for installing Apache and PHP on linux

Hello, Please give me stepwise instruction on installing Apache and PHP on linux. Thanks sheen (6 Replies)
Discussion started by: sheen
6 Replies

9. UNIX for Dummies Questions & Answers

shell scripting help/advice

hello i am trying to generate a list of the most bandwidth consuming ip's from an Apache style log file. the script is run with the path to the log file as the only peramater. here is my code so far: echo "The ten most bandwidth consuming IP's were:" $outpt='' for ip in $(awk '{print $1}'... (4 Replies)
Discussion started by: qcent
4 Replies

10. Shell Programming and Scripting

sed command to parse Apache config file

Hi there, am trying to parse an Apache 'server' config file. A snippet of the config file is shown below: ..... ProxyPassReverse /foo http://foo.example.com/bar ..... ..... RewriteRule ^/(.*) http://www.example.com/$1 RewriteRule /redirect https://www.example1.com/$1 ........ (7 Replies)
Discussion started by: jy2k7ca
7 Replies

11. Shell Programming and Scripting

Help with tail command

Hi All, My query seems to be silly but Iam unable to find where the exact problem lies. I have a script to unzip set of files here is the script #!/bin/ksh Count=`cat /home/gaddamja/Tempfile | wc -l` while do Filename=`cat /home/gaddamja/Tempfile |tail -$Count | head -1` cd... (7 Replies)
Discussion started by: jagadish_gaddam
7 Replies

12. Linux

Cannot successfully build PHP in Fedora 9

Hi everyone, I need to update PHP from 5.2.6 to the latest version, and I can't build it properly. I just upgraded Apache to 2.2.17, and that is working fine, but when I build PHP, libphp5.so is not built and placed in the Apache modules folder. I have stripped the ./configure command down to... (5 Replies)
Discussion started by: manafi
5 Replies

13. Shell Programming and Scripting

Determine Content-Type

I am limited to using only libraries that come with the default install of ActivePerl. I'd like to be able to determine the content type of a file on the fly. I thought CGI.pm might do it, but it looks a little weird to me from the perldoc. If someone has a quick way to determine the type of... (4 Replies)
Discussion started by: mrwatkin
4 Replies

14. Emergency UNIX and Linux Support

Different OS Kernel Update Frequency

Hi guys I'm trying to configure a collaboration suit (PHP, PostgreSQL, Apache) plus a mail server(Sendmail and Dovecot) on a single box. It will be used heavily 24*7. So having a long up time is really needed. I'm looking for 3 to 6 month up time. I want to know about kernel update... (6 Replies)
Discussion started by: majid.merkava
6 Replies

15. Shell Programming and Scripting

PHP script that detects if auth is required or not on Apache Splunk

I am currently trying to do a PHP script that detects automatically if Apache Splunk authentication is required or not but I'm having a hard time since HTTP code 303 is always coming back, even if auth is required or not. Here is the script so far; <?php /** * Apache Splunk script to... (4 Replies)
Discussion started by: syrius
4 Replies