Hello

I recently installed Apache 2 with php as module on my pc so i can test php scripts, and found out that $PHP_SELF is not set at all, not even outside functions. I was using Xitami before that, and all was working perfectly! What's Happening?

    Hi,

    it's properæy because register_globals is off, set it to on in php.ini or use:
    $_SERVER["PHP_SELF"]

      Thx but,

      I tried the globlals thing, which didnt work, and $_SERVER["PHP_SELF"] would return like /dev/phl.php and not /phl.php.
      I have php 4.2.1 running and before using Apache, everything was fine.

        10 days later

        Use $_SERVER[PHP_SELF] no quotes around PHP_SELF as suggested before.

          Write a Reply...