Anyone know where php is located

O

ozzi4648

Guest
Does anyone know where the location of php executables is?
 

bmcpanel

Well-Known Member
Jun 1, 2002
546
0
316
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
 
O

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?
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
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.
 
O

ozzi4648

Guest
which php
/usr/bin/php

Dg, how many php executable files do you have in this directory?
 
O

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

[email protected] [/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:

[email protected] [/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!
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
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.