What's the default location of PHP

How do I find the default location of PHP on my Linux Server (Red Hat Fedora Core 7 - I think).
I need this for the special instructions on setting up a cron job:
In my case, /usr/local/bin is empty.

Ensure that the first line of the cron file is the location of php on the server.  
Default first line entry on this file is:
#!/usr/local/bin/php -q
The /usr/local/bin/php should be the location of php
LVL 8
pzozulkaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SteveNetwork ManagerCommented:
just type 'which php'

and that'll tell you where its installed..

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cjl7freelance for hireCommented:
Or change the #! line to #!/usr/bin/env php -q

//jonas
0
woolmilkporcCommented:
.. or check your rpm -
issue 'rpm -qa | grep php ' to find your exact php package name, then
issue 'rpm -qf [package name from above]' to see all the files the rpm package contains.

Easily you will find your php binary and all the other interesting things in there.

wmp
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

pzozulkaAuthor Commented:
I tried both of your suggestions and get this response, an ideas? Thanks for your help.
Extension '/var/www/vhosts/domain.com/httpdocs/spot/admin/cron/cron_pop.php' not present.

cron_pop.php is the script where I inserted
1) #!/usr/bin/env php -q
2) #!/usr/bin/php -q (<---------result of 'which php')
0
pzozulkaAuthor Commented:
Nevermind, in the cron job setup I entered this in the command line instead:
/usr/bin/php /var/www/vhosts/domain.com/httpdocs/spot/admin/cron/cron_pop.php
0
SteveNetwork ManagerCommented:
Yeah under cron you need to specify the entire path.. as youve done..

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.