Home >Backend Development >PHP Problem >How to check php installation location

How to check php installation location

藏色散人
藏色散人Original
2020-08-31 09:17:467743browse

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.

How to check php installation location

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn