[Xitami] Why does $PHP_SELF not work?

Gerry Aquino xitami@lists.xitami.org
Thu, 12 Dec 2002 14:10:12 -0600


On Thu, 12 Dec 2002 19:53:39 -0000
   "Tim Brummitt" <timbrummitt@ntlworld.com> 
wrote:

>I cannot get $PHP_SELF to work when running 
>Xitami on my PC. I have a PHP
>program which includes a form with the following 
>action: -
>
><form action= "<?php $PHP_SELF ?>" 
>method="post">
>
>When I run the program I get a "The Page Cannot 
>Be Found" message with the
>address bar set to:
>
>http://127.0.0.1:1080/<br%20/><b>Notice</b>:%20%20Undefined%20variable:%20%2
>0PHP_SELF%20in%20<b>C:/Xitami/webpages/search.php</b>%20on%20line%20<b>37</b
>><br%20/>
>
>I am running Xitami v2.5b4  on a stand-alone XP 
>PC.  When I run the same
>code at an external PHP server it works and 
>re-opens the original page. Is
>there something missing from my version of PHP 
>or Xitami?
>
>Regards
>
>Tim Brummitt

I personally don't know much about PHP but this 
is from a previous post----
    "Another known PHP/Xitami issue.

A pretty simple workaround is the following 
php-line:
if(!isset($PHP_SELF)) $PHP_SELF = 
$_SERVER["SCRIPT_NAME"];       
works.

"
               
--gerry
                
Gerald W Aquino
Sessler Ford
847-362-4455 x 255