Professional Web Applications Themes

#25448 [Opn->Fbk]: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2) - PHP Development

ID: 25448 Updated by: [email]sniperphp.net[/email] Reported By: david at advisorymatters dot co dot uk -Status: Open +Status: Feedback Bug Type: PHP options/info functions Operating System: Windows XP Pro PHP Version: 4.3.3 New Comment: Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at [url]http://bugs.php.net/how-to-report.php[/url] If you can provide more information, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2003-09-09 06:59:11] david at advisorymatters dot co dot uk Description: ------------ Running the code (below) on ...

  1. #1

    Default #25448 [Opn->Fbk]: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2)

    ID: 25448
    Updated by: [email]sniperphp.net[/email]
    Reported By: david at advisorymatters dot co dot uk
    -Status: Open
    +Status: Feedback
    Bug Type: PHP options/info functions
    Operating System: Windows XP Pro
    PHP Version: 4.3.3
    New Comment:

    Not enough information was provided for us to be able
    to handle this bug. Please re-read the instructions at
    [url]http://bugs.php.net/how-to-report.php[/url]

    If you can provide more information, feel free to add it
    to this bug and change the status back to "Open".

    Thank you for your interest in PHP.





    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-09 06:59:11] david at advisorymatters dot co dot uk

    Description:
    ------------
    Running the code (below) on 4.3.2 and above (I've checked it on 4.3.2,
    4.3.3RC1 to RC4 and 4.3.3) fails to produce any output. On 4.3.0 and
    4.3.1 it works fine.

    For testing I am changing over the PHP versions just by renaming the
    c:\php dir (from c:\php431, c:\php432, c:\php433-1 etc). Nothing in the
    application changes and I am using one common php.ini file for all php
    versions, ONLY the php version itself is changed. All PHP versions are
    the standard Win32 Binaries with no modifications.

    In php.ini register globals are OFF and the only other changes are to
    turn a few extensions on (GD and DBX).

    I am using the Xitami web server version 2.4d9 from
    [url]http://www.xitami.com[/url] on a Compaq Evo system (Celeron 1.8MHz, 128MB
    RAM, WinXPPro).

    I've noticed that this (or similar) bugs have been reported recently
    (e.g. #24979) but dismissed by stating that it works with the latest
    CVS etc. If this is the case when this bug report is checked then I
    would suggest that there is something else going on here that is not
    showing up on your test systems. It is ALWAYS reproducible here. Note
    that using $_SERVER['SCRIPT_NAME'] DOES work (but my code tends to use
    $_SERVER['PHP_SELF'] and why should I change?).



    Reproduce code:
    ---------------
    <?php
    print "self = " . $_SERVER['PHP_SELF'];
    ?>

    Expected result:
    ----------------
    With the above code in the file test.php in the web server's doent
    root:

    self = /test.php


    Actual result:
    --------------
    self =



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25448&edit=1[/url]
    sniper@php.net Guest

  2. #2

    Default #25448 [Opn->Fbk]: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2)

    ID: 25448
    Updated by: [email]sniperphp.net[/email]
    Reported By: david at advisorymatters dot co dot uk
    -Status: Open
    +Status: Feedback
    Bug Type: PHP options/info functions
    Operating System: Windows XP Pro
    PHP Version: 4.3.3
    New Comment:

    What does "php.exe -v" output?



    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-09 11:43:52] david at advisorymatters dot co dot uk

    Not using SAPI on the Xitami web server. This is calling the PHP
    executable C:\php\php.exe. However, I have now installed Apache which
    is using the php4apache2.dll SAPI and this DOES work fine on 4.3.3.
    This indicates that the problem is probably only in the executable.

    I am accessing the page via the web browser using:
    [url]http://localhost/test.php[/url]

    Running from the command line works fine every time (I am copying the
    appropriate php4ts.dll file into c:\windows\system32\ before each
    test). I tested 4.3.1, 4.3.2, 4.3.3 and the latest CVS release. These
    all returned the correct data.

    ------------------------------------------------------------------------

    [2003-09-09 10:52:15] [email]sniperphp.net[/email]

    You didn't tell what SAPI you're using.
    Nor did you tell how you access the page.
    And does it happen when run in command line?


    ------------------------------------------------------------------------

    [2003-09-09 06:59:11] david at advisorymatters dot co dot uk

    Description:
    ------------
    Running the code (below) on 4.3.2 and above (I've checked it on 4.3.2,
    4.3.3RC1 to RC4 and 4.3.3) fails to produce any output. On 4.3.0 and
    4.3.1 it works fine.

    For testing I am changing over the PHP versions just by renaming the
    c:\php dir (from c:\php431, c:\php432, c:\php433-1 etc). Nothing in the
    application changes and I am using one common php.ini file for all php
    versions, ONLY the php version itself is changed. All PHP versions are
    the standard Win32 Binaries with no modifications.

    In php.ini register globals are OFF and the only other changes are to
    turn a few extensions on (GD and DBX).

    I am using the Xitami web server version 2.4d9 from
    [url]http://www.xitami.com[/url] on a Compaq Evo system (Celeron 1.8MHz, 128MB
    RAM, WinXPPro).

    I've noticed that this (or similar) bugs have been reported recently
    (e.g. #24979) but dismissed by stating that it works with the latest
    CVS etc. If this is the case when this bug report is checked then I
    would suggest that there is something else going on here that is not
    showing up on your test systems. It is ALWAYS reproducible here. Note
    that using $_SERVER['SCRIPT_NAME'] DOES work (but my code tends to use
    $_SERVER['PHP_SELF'] and why should I change?).



    Reproduce code:
    ---------------
    <?php
    print "self = " . $_SERVER['PHP_SELF'];
    ?>

    Expected result:
    ----------------
    With the above code in the file test.php in the web server's doent
    root:

    self = /test.php


    Actual result:
    --------------
    self =



    ------------------------------------------------------------------------


    --
    Edit this bug report at [url]http://bugs.php.net/?id=25448&edit=1[/url]
    sniper@php.net Guest

Similar Threads

  1. #25448 [Fbk->Opn]: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2)
    By david at advisorymatters dot co dot uk in forum PHP Development
    Replies: 1
    Last Post: September 10th, 07:47 AM
  2. #25448 [NEW]: $_SERVER['PHP_SELF'] fails to return a value (broken since 4.3.2)
    By david at advisorymatters dot co dot uk in forum PHP Development
    Replies: 0
    Last Post: September 9th, 11:01 AM
  3. #24745 [Com]: return ($val) is broken for references
    By no dot spam at forme dot pt in forum PHP Development
    Replies: 0
    Last Post: August 8th, 12:56 PM
  4. #24745 [Opn->Bgs]: return ($val) is broken for references
    By derick@php.net in forum PHP Development
    Replies: 0
    Last Post: July 22nd, 07:25 AM
  5. #24745 [NEW]: return ($val) is broken for references
    By vma1 at abv dot bg in forum PHP Development
    Replies: 0
    Last Post: July 22nd, 12:48 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139