Recently, I started to learn how to use Composer. after installation, I found that PHP needs to enable the php_openssl extension. when I tried the extension, I prompted cannotfindconfig. m4. I also tried Baidu but still couldn't solve it. Baidu gave the answer in most cases: find config0.m4 and try again...
Recently, I started to learn how to use Composer. after installation, I found that PHP needs to enable the php_openssl extension. when I tried the extension, the system prompts "cannot find config. m4". I am also Baidu, but it still cannot be solved.
Baidu gave the answer in most cases: find config0.m4 and rename it to config. m4, but I found that this file still does not exist. I also found the document on the official website and thought my package was incorrect.
Is there any great help to see why.
Reply content:
Recently, I started to learn how to use Composer. after installation, I found that PHP needs to enable the php_openssl extension. when I tried the extension, the system prompts "cannot find config. m4". I am also Baidu, but it still cannot be solved.
Baidu gave the answer in most cases: find config0.m4 and rename it to config. m4, but I found that this file still does not exist. I also found the document on the official website and thought my package was incorrect.
Is there any great help to see why.
The problem has been found when you compile and install your own -- prefix =/usr/local/php to execute the ext folder under the compilation directory, so you have not found the extensions. thank you.
This dependency can be compiled and installed.
sudo wget -O m4-1.4.9.tar.gz http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gzsudo tar zxvf m4-1.4.9.tar.gz cd m4-1.4.9/./configure makesudo make install
First, check whether your extension_dir has this extension. If yes, enable it.
If not, download the php5.6 source code, decompress the source code, and switch to the PHP source code directory.
Follow the steps below to install it. you need to change the path according to your environment
Cd ext/openssl
/Usr/local/php5.6/bin/phpize
./Configure -- with-php-config =/usr/local/php5.6/bin/php-config
Make
Make install
Add the configuration in php. ini.
Extension = openssl. so
Have you installed autoconf?
For New linux users, we always recommend using the system's package management tool to install PHP and various extensions:
The default CentOS source is relatively old, see: https://webtatic.com/packages/php55/
The default Ubuntu source can be directly used.sudo apt-get install php5
You can.