The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Anyone know where php is located

Discussion in 'General Discussion' started by ozzi4648, Jan 21, 2003.

  1. ozzi4648

    ozzi4648 Guest

    Does anyone know where the location of php executables is?
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    I think this is what your asking....

    php executable is in /usr/local/bin
    everything else for php should be in /usr/local/lib/php
     
  3. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    It is within the latest buildapache folder used by Cpanel. At shell, type in

    locate buildapache

    and it will give you the path. Within buildapche you should see a number of folders including the PHPfolder named php-4.2.2 or whatever version you currently have. That is the folder in which you recompile PHP.

    On my server, it is located in

    /home/cpapachebuild/buildapache/php-4.2.3
     
  4. ozzi4648

    ozzi4648 Guest

    [quote:7d3683ee2d][i:7d3683ee2d]Originally posted by bmcpanel[/i:7d3683ee2d]

    It is within the latest buildapache folder used by Cpanel. At shell, type in

    locate buildapache

    and it will give you the path. Within buildapche you should see a number of folders including the PHPfolder named php-4.2.2 or whatever version you currently have. That is the folder in which you recompile PHP.

    On my server, it is located in

    /home/cpapachebuild/buildapache/php-4.2.3[/quote:7d3683ee2d]

    Thank, but im not looking for the source code. That is the source. Im looking for the binary, the objects created by make install that are executable by my users. My users cant even run cron on the command line. They claim that a cron job defined like this on the command line php -q /home/username/public_html/ does not work. Also, php cgi or the php-cli is not installed on the server so how does the cron feature from the CP even work? Or does it?
     
  5. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Ozzi - On your server do - which php

    This shows you the path to the php executable. If it comes back as not found then check the environment variables and make sure /usr/local/bin is in the path.
     
  6. ozzi4648

    ozzi4648 Guest

    which php
    /usr/bin/php

    Dg, how many php executable files do you have in this directory?
     
  7. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    I have php php-config phpextdist phpize phptar
    in that directory but we use the php executable we have in /usr/local/bin.
     
  8. ozzi4648

    ozzi4648 Guest

    [quote:daa2b51852][i:daa2b51852]Originally posted by dgbaker[/i:daa2b51852]

    I have php php-config phpextdist phpize phptar
    in that directory but we use the php executable we have in /usr/local/bin.

    [/quote:daa2b51852]

    Ok here is the strange part. All of my boxes, except one, php is locate in /usr/bin

    root@srv05 [/usr/bin]# ls -la php*
    -rwxr-xr-x 1 root root 3266222 Dec 30 11:06 php*
    -rwxr-xr-x 1 root root 516 Dec 30 11:06 php-config*
    -rwxr-xr-x 1 root root 593 Dec 30 11:06 phpextdist*
    -rwxr-xr-x 1 root root 688 Dec 30 11:06 phpize*
    -rwxr-xr-x 1 root root 5082 Dec 30 11:06 phptar*

    On the other box php* is completely missing yet php works fine. Cannot find php. If i type which php on this box i get this:

    root@srv08 [/usr/bin]# /usr/bin/which php
    /usr/bin/which: no php in (/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/home/admin/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin)

    /usr/local/bin/php-config
    /usr/local/bin/phpextdist
    /usr/local/bin/phpize
    /usr/local/bin/phptar

    Php is not in the above list

    This is my delimena!
     
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    So on that server with what happens when you type php -h from the command line?

    What php.ini is being used? Locate php.ini
    You should find several but we have found two places that are normally used.

    /usr/local/lib/php.ini
    /usr/local/Zend/etc/php.ini (If you have Zend)

    But I have to admit that is wierd.
     
Loading...

Share This Page