Re: *weird* virtual server/PHP_SELF problem
| From: | Matthew Ballard | Date: | Wed, 06 Dec 2000 09:48:23 +0000 |
| Subject: | Re: *weird* virtual server/PHP_SELF problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28865@lists.php.net to get a copy of this message | ||
PHP_SELF is just supposed to return the part after the hostname. If you are using a standard form, you don't need the host in there, unless it's being passed to another server, in which cause you can just use "http://$HTTP_HOST$PHP_SELF" as the URL to pass. If you are just using a standard form and want it to submit to the same page, specifying the host isn't necessary (I never do).
Matthew
At 02:31 AM 12/6/2000 +0000, you wrote:
Hi Folks,
I'm encountering a weird problem with my virtual server setup (implemented with
Apache/1.3.14 (Unix) DAV/1.0.1 PHP/4.0.3pl1 mod_ssl/2.7.1 OpenSSL/0.9.6)
and I'm wondering if anyone can help me.
Basically PHP_SELF which gets used to build FORM ACTION boxes and so
on only returns the right hand component of what I thought was the URL requested.
It does not return the hostname. Example: I request http://www.americanq.com/blah.php
from my browser, PHP_SELF says (and phpinfo() confirms) that it's blah.php.
The FORM ACTION building mechanism more or less requires the http://hostname
bit as well.
Could it have something to do with my Apache virtual server setup? It's something
like:
NameVirtualHost *
<VirtualHost *>
ServerName www.americanq.com
DocumentRoot blah/americanq
ServerAdmin ops@blah.com
</VirtualHost>
.... and so on.
Any ideas?
Niall
--
Enigma Consulting Ltd
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net