Results 1 to 7 of 7

Thread: php path

  1. #1

    php path

    Hello

    i'm novice in SSH language, just know the commands that i use often.

    my hoster, as he said did upgrade 2 days ago, [had an upgrade to apache 2], and some SSH command that i use before this, now don't work

    for example, i had php script, which i run from ssh

    [php go.php]

    which don't work now ... got an error:
    Code:
    -bash: php: command not found
    so my question is how to find php right path ?

    Code:
     $ whereis php
    output:

    Code:

    Code:
    php: /usr/src/php-5.2.0/php5.spec /usr/src/php-5.2.0/php.ini-dist /usr/src/php-5.2.0/php.ini-recommended /usr/src/php-5.2.0/php.gif /usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php
    as i understand, path is /usr/local/lib/php

    after this try to type

    Code:
    /usr/local/lib/php go.php
    output
    Code:
     
     /usr/local/lib/php: is a directory
    btw

    when i type

    echo $PATH

    get
    Code:
    /usr/kerberos/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/home/MYUSERNAME/bin



    any advise?

    thank you
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  2. #2
    Join Date
    Aug 2003
    Location
    Vancouver, BC
    Posts
    1,894
    I believe if you do a page with <?php phpinfo(); ?> in it that will show the php path. Check the include_path.
    Gary Jones

    BlueFur.com - Canada Web Hosting

  3. #3
    ok . do phpinfo, regarding this file
    Configuration File (php.ini) Path /usr/local/lib/php.ini

    after this try

    Code:
    /usr/local/lib/php go.php

    output
    Code:
    /usr/local/lib/php: is a directory
    correct me, if i'm doing anything wrong
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  4. #4
    Join Date
    Jul 2004
    Location
    Texas
    Posts
    688
    /usr/local/bin/php seems to be the path
    Hello

  5. #5
    Run

    /usr/local/bin/php go.php

    and paste the output.

  6. #6
    output

    Code:
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    sh: php: command not found
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

  7. #7
    Quote Originally Posted by Tailseh
    /usr/local/bin/php seems to be the path
    i got the same answer from my hoster too, but why in this case i got [sh: php: command not found] ???


    very odd
    don't understand
    Your Health Encyclopedia
    Medical and health consumer information resources containing comprehensive and unbiased information in patient-friendly language

Posting Permissions

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