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

How to check php installation location

藏色散人
Release: 2023-03-05 13:42:01
Original
7832 people have browsed it

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!

Related labels:
php
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template