Scenario / Questions
I am using centos and I need to find out where is the php installation path is. Is there a command I can use to find that out.
Find below all possible solutions or suggestions for the above questions..
I would recommend creating a new test.php files and inserting this code:
<?php phpinfo(); ?>
Then browse to test.php in a browser. This should give you a lot of information on php.
If you installed via an rpm also try
rpm -ql php
find / -name php.ini
I’m not sure what you mean by install path, if you’re talking about the binary ‘which php’ will probably work.
If you’re referring to something else like the extension install dir and assuming your php was installed with RPMs, do a ‘yum install php-devel’ to get the php-config command. You can run it with no options to get a listing of everything it knows or you can request only certain info from it, here’s some useful ones for your situation:
php-config --php-binary php-config --extension-dir php-config --include-dir
Also try running ‘php -i’ on the command line to get the output of phpinfo.
You can also use this command
php -i | grep "Loaded Configuration File"
My install is in
But I’m not sure what you are trying to accomplish
Kubernetes Free Online Tutorial, Kubernetes Beginner Tutorial
DevOps Free Online Tutorial, DevOps Beginner Tutorial
Ansible Free Online Tutorial, Ansible Beginner Tutorial
Docker Free Online Tutorial, Docker Beginner Tutorial
Openstack Free Online Tutorial, Openstack Beginner Tutorial
Disclaimer: This has been sourced from a third party syndicated feed through internet. We are not responsibility or liability for its dependability, trustworthiness, reliability and data of the text. We reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever.