PHP 7.4.9 Released!

## 在 Windows 上安装 PHP 扩展

### 去哪里找扩展库？

PHP 扩展库通常称为“php_*.dll”（其中星号代表具体某扩展的名字），位于“PHP\ext”目录下（在 PHP 4 中位于“PHP\extensions”目录下）。

PHP 发行包中包括了大多数开发者最常用到的扩展库。这些被称为“核心”扩展库。

### 下载哪个扩展？

• 不同的版本号（至少前两个数字要一致）
• 不同的线程安全性设定
• 不同的处理器体系（x86，x64，...)
• 不同的排错设定
• 其它

Example #1 phpinfo() call

 <?phpphpinfo();?> 

drive:\\path\to\php\executable\php.exe -i


### 载入一个扩展

;extension=php_extname.dll

extension=php_extname.dll


Configuration File (php.ini) Path  C:\WINDOWS

Loaded Configuration File   C:\Program Files\PHP\5.2\php.ini


### 解决问题

 This is not really true all the time:"However, some web servers are confusing because they do not use the php.ini located alongside your PHP executable. To find out where your actual php.ini resides, look for its path in phpinfo():Configuration File (php.ini) Path  C:\WINDOWS"Ignore the path being C:\windowsThis issue goes back over a decade.  Php is hardwired to display "C:\windows" even though there is not any php.ini at that location.  Moving php.ini to C:\windows will accomplish nothing.  I have seen many posts about folks complaining that they can't get it to stop displaying "Path C:\windows".  I have not seen anything posted that fixes this and a few posts that claim it is hardwired to display this.  I have both working and broken php setups on various windows machines and they all say this same "c:\windows" even though my php.ini file is in c:\php.  I know apache is using the file c:\php\php.ini and not the windows directory because there is no php.ini in windows directory and changes to my php.ini file work fine even though the info from phpinfo is wrong on this line. 
 In xampp. After removing the semicolon from the php.ini file, I had to stop the the apache server from the xampp GUI and restart it. Then I used the following code to view all the loaded extentions and my extension was shown there as well.print_r(get_loaded_extensions());Hope this helps! 
 For Windows try setting the  extension_dir set to a complete path if you have an error. Only having extension_dir ="ext" did not work for me. The Apache error log showed it looking for ext\\<extension.dll> and unable to find it.; Directory in which the loadable extensions (modules) reside.; http://php.net/extension-dir; extension_dir = "./"; On windows:extension_dir = "C:\php\ext"