Home >Backend Development >PHP Problem >How to check php installation location
How to check the php installation location: first use the command "find / -name php.ini" to check whether the system has a php configuration file; then use "netstat -ntpl" to check whether the 9000 port is running; finally pass "php -v" PHP version information is enough.
Recommendation: "PHP Video Tutorial"
linux view php environment installation path
1. First, you can use find / -name php.ini to check whether the system has a php configuration file.
2. Use netstat -ntpl to check whether port 9000 is running.
3. If port 9000 exists, you can use lsof -i:9000 to view the file location
4. In addition, if the system has installed php, you can also use php -v to view the version number, provided that the environment is set Variable
apache:
If you use RPM package to install, the installation path should be in the /etc/httpd directory
apache configuration file:/etc/httpd/conf/httpd. conf
Apache module path:/usr/sbin/apachectl
web directory:/var/www/html
If installed from source code, it is generally installed in /usr by default
#php in the /local/apache2 directory:
If you use the RPM package to install, the installation path should be in the /etc/ directory
php configuration file:/etc/php .ini
If you use source code installation, it is generally installed in the /usr/local/lib directory by default
php configuration file: /usr/local/lib/php.ini
Or /usr/local/php/etc/php.ini
mysql:
If you use the RPM package to install, the installation path should be in the /usr/share/mysql directory
mysqldump file location:/usr/bin/mysqldump
mysqli configuration file:
/etc/my.cnf or /usr/share/mysql/my.cnf
The mysql data directory is in the /var/lib/mysql directory
If you use source code installation, it is generally installed in the /usr/local/mysql directory by default
The above is the detailed content of How to check php installation location. For more information, please follow other related articles on the PHP Chinese website!