What to do if there is no extension in php

藏色散人
Release: 2023-03-04 09:18:02
Original
2694 people have browsed it

There is no extension in php because the supported libraries are set to "enable" during compilation. The solution is to add the parameter "--with-config-file-scan-dir=/etc/php" .d" is enough.

What to do if there is no extension in php

Recommended: "PHP Video Tutorial"

php There is no extension in php.ini

Today I took a look at the php configuration in centOS

vim /etc/php.ini
Copy after login

I found that there is no extension=

configuration, even if there is; it is commented out

php -i found that

Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.d
Additional .ini files parsed => /etc/php.d/bz2.ini,
/etc/php.d/calendar.ini,
/etc/php.d/ctype.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/exif.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/ftp.ini,
/etc/php.d/gd.ini,
/etc/php.d/gettext.ini,
/etc/php.d/gmp.ini,
/etc/php.d/iconv.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/shmop.ini,
/etc/php.d/simplexml.ini,
/etc/php.d/sockets.ini,
/etc/php.d/sqlite3.ini,
/etc/php.d/tokenizer.ini,
/etc/php.d/xml.ini,
/etc/php.d/xml_wddx.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini
Copy after login

was originally loaded from /etc/php.d. When compiling php, add the parameter --with-config-file-scan-dir=/etc/php.d, because it is not The downloaded source code is compiled and installed directly with php7.2, so this parameter should be carried by default.

So php will actively search for all ini configuration files in scan-dir other than php.ini.

Libraries that are supported during compilation are generally set to enable because they can be found in /etc/php.d. Without this parameter, Scan this dir for additional .ini files will be empty. Various libraries will not be automatically loaded. You need to add

to php.ini yourself.

The above is the detailed content of What to do if there is no extension in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!