How to definded which version php should using

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

    #1

    How to definded which version php should using

    I have two versions of PHP in UNIX/LINUX system

    /usr/bin/php (4.3.2)
    /usr/local/bin/php (5.0.4)

    In a shell script file I can define first line as

    #!/usr/local/bin/php

    or I can type full path on command line.

    My question is how to defind the path in
    PHP web page?

    I mean when I have codes

    <?php

    my codes are here

    ?>

    How does the web server know which version to run?
    How can I do the similar thing like PERL/CGI script
    put #!/path/php in my php web page file?

    Thank Q very much in advance!

    P.S.
    Now, I set the PATH /usr/local/bin:/usr/bin
    On command line will run /usr/local/bin/php,
    unless you type full path /usr/bin/php
  • Jerry Stuckle

    #2
    Re: How to definded which version php should using

    RC wrote:[color=blue]
    > I have two versions of PHP in UNIX/LINUX system
    >
    > /usr/bin/php (4.3.2)
    > /usr/local/bin/php (5.0.4)
    >
    > In a shell script file I can define first line as
    >
    > #!/usr/local/bin/php
    >
    > or I can type full path on command line.
    >
    > My question is how to defind the path in
    > PHP web page?
    >
    > I mean when I have codes
    >
    > <?php
    >
    > my codes are here
    >
    > ?>
    >
    > How does the web server know which version to run?
    > How can I do the similar thing like PERL/CGI script
    > put #!/path/php in my php web page file?
    >
    > Thank Q very much in advance!
    >
    > P.S.
    > Now, I set the PATH /usr/local/bin:/usr/bin
    > On command line will run /usr/local/bin/php,
    > unless you type full path /usr/bin/php[/color]

    It's determined by the LoadModule statement in your httpd.conf file.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...