Sorry..try this one...phpinfo and PHP predefined constants do NOT match!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lwoods

    #1

    Sorry..try this one...phpinfo and PHP predefined constants do NOT match!

    Sorry for previous email...hit the wrong key!

    Original Email:

    I ran the following code:
    <?php
    $a=get_defined_ constants();
    foreach($a as $key=>$value){
    echo "$key = $value<br/>";
    }
    ?>

    and got the following as part of my output:
    ......
    PHP_EXTENSION_D IR = C:\php5
    PHP_PREFIX = C:\php5
    PHP_BINDIR = C:\php5
    PHP_LIBDIR = C:\php5
    PHP_DATADIR = C:\php5
    PHP_SYSCONFDIR = C:\php5
    PHP_LOCALSTATED IR = C:\php5

    But I don't HAVE a "C:\php5" folder. I have everything in a folder called
    "C:\PHP"... and when I run phpinfo() it lists the "C:\PHP\... " folder names
    for 'includes', 'extensions', etc.

    This tells me that you can't depend on the predefined constants.

    ??????????????? ?

    Larry Woods


  • R. Rajesh Jeba Anbiah

    #2
    Re: Sorry..try this one...phpinfo and PHP predefined constants do NOT match!

    lwoods wrote:[color=blue]
    > Sorry for previous email...hit the wrong key!
    >
    > Original Email:
    >
    > I ran the following code:
    > <?php
    > $a=get_defined_ constants();
    > foreach($a as $key=>$value){
    > echo "$key = $value<br/>";
    > }
    > ?>
    >
    > and got the following as part of my output:
    > .....
    > PHP_EXTENSION_D IR = C:\php5
    > PHP_PREFIX = C:\php5
    > PHP_BINDIR = C:\php5
    > PHP_LIBDIR = C:\php5
    > PHP_DATADIR = C:\php5
    > PHP_SYSCONFDIR = C:\php5
    > PHP_LOCALSTATED IR = C:\php5
    >
    > But I don't HAVE a "C:\php5" folder. I have everything in a folder called
    > "C:\PHP"... and when I run phpinfo() it lists the "C:\PHP\... " folder names
    > for 'includes', 'extensions', etc.
    >
    > This tells me that you can't depend on the predefined constants.[/color]

    Better report it to the PHP dev team via bugs.php.net and update the
    status here.

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    Working...