X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C865E53938 for ; Tue, 5 Apr 2005 16:10:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71018-08 for ; Tue, 5 Apr 2005 15:10:02 +0000 (GMT) Received: from grassmarket.ucs.ed.ac.uk (grassmarket.ucs.ed.ac.uk [129.215.166.64]) by svr1.postgresql.org (Postfix) with ESMTP id 858DA53939 for ; Tue, 5 Apr 2005 16:09:57 +0100 (BST) Received: from grassmarket.ucs.ed.ac.uk (localhost [127.0.0.1]) by grassmarket.ucs.ed.ac.uk (8.12.10/8.12.10) with ESMTP id j35F9tY8012855 for ; Tue, 5 Apr 2005 16:09:55 +0100 (BST) Received: (from nobody@localhost) by grassmarket.ucs.ed.ac.uk (8.12.10/8.12.9/Submit) id j35F9t3l012853 for pgsql-php@postgresql.org; Tue, 5 Apr 2005 16:09:55 +0100 (BST) From: SG Edwards X-Authentication-Warning: grassmarket.ucs.ed.ac.uk: nobody set sender to s0460205@sms.ed.ac.uk using -f Received: from lrc2-ad2.publab.ed.ac.uk (lrc2-ad2.publab.ed.ac.uk [129.215.79.6]) by sms.ed.ac.uk (IMP) with HTTP for ; Tue, 05 Apr 2005 16:09:55 +0100 Message-ID: <1112713795.4252aa4384e8c@sms.ed.ac.uk> Date: Tue, 05 Apr 2005 16:09:55 +0100 To: "pgsql-php@postgresql.org" Subject: problem with predefined variables MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.751 tagged_above=0 required=5 tests=AWL, FROM_ENDS_IN_NUMS, TO_ADDRESS_EQ_REAL X-Spam-Level: X-Archive-Number: 200504/11 X-Sequence-Number: 3095 Hi, I am just learning PHP and have a very simple script to access data in a predefined variable as follows: $PHP_SELF.

\n"; echo 'you are viewing this page usinig:
', $HTTP_USER_AGENT, '
from the IP address ', $REMOTE_ADDR; ?> However, the assignment does not happen, giving the command line error (PHP Notice: Undefined variable: PHP_SELF in /home/s0460205/public_html/test.php on line 10 you are running the file .

you are viewing this page usinig:
PHP Notice: Undefined variable: HTTP_USER_AGENT in /home/s0460205/public_html/test.php on line 11
from the IP address PHP Notice: Undefined variable: REMOTE_ADDR in /home/s0460205/public_html/test.php on line 11) - why would this occur? Many thanks (I am running PHP/4.3.10)