Bug #10838 Updated: wierd problem concatenating global string vars
| From: | derick@php.net | Date: | Sun, 13 May 2001 08:59:29 +0000 |
| Subject: | Bug #10838 Updated: wierd problem concatenating global string vars | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-55073@lists.php.net to get a copy of this message | ||
ID: 10838
Updated by: derick
Reported By: gearond@cvc.net
Old-Status: Open
Status: Feedback
Bug Type: Unknown/Other Function
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
This works fine for me, with Apache/1.3.12, php 4.0.3pl1 on Linux,
can you set-up the script that you can download at php.jdimedia.nl/bug10838.txt on your server so
that we can see the problem?
regards,
Derick
Previous Comments:
---------------------------------------------------------------------------
[2001-05-13 01:47:42] gearond@cvc.net
<the version is two back, but I would
be hesitant to ask my ISP to change
to 4.0.5 after all the little problems
I read about. Can you tell me if the following
is fixed in versions > 4.0.3pl1 ?
If I do echo($HTTP_SERVER_VARS["SERVER_ADDR"])
I get the expected server address ***WITHOUT A SLASH AT THE END***
eg. "my.server.address"
-------
If I do echo($PHP_SELF)
I get the expeted URL relative the the server ***WITH O-N-E SLASH** at
beginning.
eg. "/expected/url/relative/doc_name"
-------
If I do THIS:
$this_page = "http://" .
$HTTP_SERVER_VARS["SERVER_ADDR"] . $PHP_SELF;
echo( $this_page );
I get, "http://my.server.address//expected/url/relative/doc_name"
There is **ALWAYS** a double slash between the server address and the
doc path,
if the concatenation of those two variables occurs in the same
statement.
It works when used as an action for a form, but I don't think it should
do unexpected
results.
-------
HOWEVER
If I do **THIS**:
$this_page = "http://";
$this_page .= $HTTP_SERVER_VARS["SERVER_ADDR"];
$this_page .= $PHP_SELF;
I get the correct results,
"http://my.server.address/expected/url/relative/doc_name"
My provider is using PHP version 4.0.3pl1
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10838&edit=2