How do you find the path to the php executable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • comp.lang.php

    How do you find the path to the php executable?

    I am not able to find where the PHP executable is located on a shared
    hosting platform used for one of the sites here at work, and Tech
    Support appears to either not know or not want us to know where it's
    found. This is for a required CLI PHP script that has been running on a
    dedicated host for some time that they decided to move to a shared
    hosting service.

    Thanks
    Phil

  • J.O. Aho

    #2
    Re: How do you find the path to the php executable?

    comp.lang.php wrote:
    I am not able to find where the PHP executable is located on a shared
    hosting platform used for one of the sites here at work, and Tech
    Support appears to either not know or not want us to know where it's
    found. This is for a required CLI PHP script that has been running on a
    dedicated host for some time that they decided to move to a shared
    hosting service.
    whereis php


    //Aho

    Comment

    • comp.lang.php

      #3
      Re: How do you find the path to the php executable?


      J.O. Aho wrote:
      comp.lang.php wrote:
      I am not able to find where the PHP executable is located on a shared
      hosting platform used for one of the sites here at work, and Tech
      Support appears to either not know or not want us to know where it's
      found. This is for a required CLI PHP script that has been running on a
      dedicated host for some time that they decided to move to a shared
      hosting service.
      >
      whereis php
      >
      Thanx.. appears "which php" works as well!

      Phil
      >
      //Aho

      Comment

      • Tim Van Wassenhove

        #4
        Re: How do you find the path to the php executable?

        comp.lang.php schreef:
        J.O. Aho wrote:
        >comp.lang.ph p wrote:
        >> I am not able to find where the PHP executable is located on a shared
        >>hosting platform used for one of the sites here at work, and Tech
        >>Support appears to either not know or not want us to know where it's
        >>found. This is for a required CLI PHP script that has been running on a
        >>dedicated host for some time that they decided to move to a shared
        >>hosting service.
        >whereis php
        >>
        >
        Thanx.. appears "which php" works as well!
        If i remember well this should work out to as she-bang line...

        #!/usr/bin/which php


        --
        Tim Van Wassenhove <url:http://www.timvw.be/>

        Comment

        • NC

          #5
          Re: How do you find the path to the php executable?

          comp.lang.php wrote:
          >
          I am not able to find where the PHP executable is located on a shared
          hosting platform used for one of the sites here at work, and Tech
          Support appears to either not know or not want us to know where it's
          found. This is for a required CLI PHP script that has been running on a
          dedicated host for some time that they decided to move to a shared
          hosting service.
          Er, shared hosting services usually do not provide command-line
          PHP scripting at all. Enabling command-line scripting on a shared
          host could lead to security issues and resource management
          problems. This is why you need a dedicated server or at least a
          virtual dedicated server to run command-line PHP...

          Cheers,
          NC

          Comment

          • comp.lang.php

            #6
            Re: How do you find the path to the php executable?


            NC wrote:
            comp.lang.php wrote:

            I am not able to find where the PHP executable is located on a shared
            hosting platform used for one of the sites here at work, and Tech
            Support appears to either not know or not want us to know where it's
            found. This is for a required CLI PHP script that has been running on a
            dedicated host for some time that they decided to move to a shared
            hosting service.
            >
            Er, shared hosting services usually do not provide command-line
            PHP scripting at all. Enabling command-line scripting on a shared
            host could lead to security issues and resource management
            problems. This is why you need a dedicated server or at least a
            virtual dedicated server to run command-line PHP...
            >
            That is what I told people here as a matter of fact, but I at least
            wanted to investigate any "loopholes" , to which there are, of course,
            none.

            Thanx
            Cheers,
            NC

            Comment

            • Asper Faner

              #7
              Re: How do you find the path to the php executable?


              comp.lang.php wrote:
              J.O. Aho wrote:
              comp.lang.php wrote:
              I am not able to find where the PHP executable is located on a shared
              hosting platform used for one of the sites here at work, and Tech
              Support appears to either not know or not want us to know where it's
              found. This is for a required CLI PHP script that has been running on a
              dedicated host for some time that they decided to move to a shared
              hosting service.
              whereis php
              >
              Thanx.. appears "which php" works as well!
              >
              Phil
              >

              //Aho
              Depending on your unixsys, try locate, find may work also.

              Comment

              Working...