$_SERVER["PHP_SELF"]-question

$_SERVER["PHP_SELF"]-question

am 26.10.2005 16:24:06 von pablo k

Hello,

What reasons can there be that the echo $_SERVER['PHP_SELF']
(between in the resent html-page?

tia
pablo k

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 16:40:57 von Shion

pablo k wrote:
> Hello,
>
> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
> > resent html-page?

have the fun to see what the server thinks that the page you requested is named.


//Aho

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 16:48:56 von pablo k

J.O. Aho wrote:
> pablo k wrote:
>
>>Hello,
>>
>>What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>> >>resent html-page?
>
>
> have the fun to see what the server thinks that the page you requested is named.
>
>
> //Aho
Dear Aho,

Hmmm, not sure what you mean. The thing is that i would expect to
see the name of the file to come back in the resent html page? But i
don't see it there. Just "".

pablo k

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 16:58:41 von Hilarion

> What reasons can there be that the echo $_SERVER['PHP_SELF']
> (between > in the resent html-page?


Are you sure it is:



You may try this somewhere on the page:


print_r( $_SERVER );
?>


and check what is there and what is not.
If you do not want to show it to users, then change "
" to "".


Hilarion

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:06:45 von gale

pablo k wrote:
> Hello,
>
> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
> > resent html-page?
>
> tia
> pablo k

try putting it in { }

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:11:43 von pablo k

Hilarion wrote:
>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>> >> resent html-page?
>
>
>
> Are you sure it is:
>
>
>
> You may try this somewhere on the page:
>
>


> > print_r( $_SERVER );
> ?>
>

>
> and check what is there and what is not.
> If you do not want to show it to users, then change "
" to "".
>
>
> Hilarion

Hilarion,

There is nothing there with print_r( $_SERVER ) ;

pablo k

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:16:30 von pablo k

Hilarion wrote:
>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>> >> resent html-page?
>
>
>
> Are you sure it is:
>
>
>
> You may try this somewhere on the page:
>
>


> > print_r( $_SERVER );
> ?>
>

>
> and check what is there and what is not.
> If you do not want to show it to users, then change "
" to "".
>
>
> Hilarion
Sorry,

Forgot to look under the hood.

[REQUEST_URI] => /apache2-default/info4u/bewerkNrJrg.php
[SCRIPT_NAME] => /apache2-default/info4u/bewerkNrJrg.php
[PHP_SELF] => /apache2-default/info4u/bewerkNrJrg.php

Is this what you mean?

pablo k

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:18:44 von Hilarion

>>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>>> >>> resent html-page?
>>
>>
>>
>> Are you sure it is:
>>
>>
>>
>> You may try this somewhere on the page:
>>
>>


>> >> print_r( $_SERVER );
>> ?>
>>

>>
>> and check what is there and what is not.
>> If you do not want to show it to users, then change "
" to "".
>
> There is nothing there with print_r( $_SERVER ) ;


Try $HTTP_SERVER_VARS instead of $_SERVER (if it's inside function
or method, then use "global" keyword). If it works that this means
that you are using very old version of PHP. If it's still empty,
then there's something strange with your server settings.


Hilarion

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:22:07 von Hilarion

>>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>>> >>> resent html-page?
>>
>>
>>
>> Are you sure it is:
>>
>>
>>
>> You may try this somewhere on the page:
>>
>>


>> >> print_r( $_SERVER );
>> ?>
>>

>>
>> and check what is there and what is not.
>> If you do not want to show it to users, then change "
" to "".
>
> Forgot to look under the hood.
>
> [REQUEST_URI] => /apache2-default/info4u/bewerkNrJrg.php
> [SCRIPT_NAME] => /apache2-default/info4u/bewerkNrJrg.php
> [PHP_SELF] => /apache2-default/info4u/bewerkNrJrg.php
>
> Is this what you mean?


Yes. This means that $_SERVER['PHP_SELF'] is there but you
are accessing it in a wrong way. Look for typo or something
like that (or maybe you forgot to "echo" it).

You may also want to change your level of error reporting by
placing "error_reporting( E_ALL );" in the first line of your
script (only for debug, in production this can be a bit dangerous
because info comming from error messages can be used by attackers).


Hilarion

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:29:07 von pablo k

Gale wrote:
> pablo k wrote:
>
>> Hello,
>>
>> What reasons can there be that the echo $_SERVER['PHP_SELF'] (between
>> >> resent html-page?
>>
>> tia
>> pablo k
>
>
> try putting it in { }
Like this?
''
or
''

pablo k

Re: $_SERVER["PHP_SELF"]-question

am 26.10.2005 17:29:26 von pablo k

Hilarion wrote:
> You may also want to change your level of error reporting by
> placing "error_reporting( E_ALL );" in the first line of your
> script (only for debug, in production this can be a bit dangerous
> because info comming from error messages can be used by attackers).
>
>
> Hilarion
Thnx,
and thanks for the E_ALL advice!

pablo k