PHP 확장 설치하기

윈도우에서, PHP 확장을 적재하는 두가지 방법이 있습니다: PHP 안에 컴파일하거나, DLL을 적재. 미리 컴파일된 확장을 적재하는 것이 쉽고 편한 방법입니다.

확장을 적재하려면, 시스템에 해당하는 ".dll" 파일이 있어야 합니다. 모든 확장은 자동으로 주기적으로 PHP 그룹에서 컴파일합니다. (내려받기는 다음 섹션을 참고하십시오)

확장을 PHP 안에 컴파일하려면, 소스에서 빌드하기 문서를 확인하십시오.

독립 확장(DLL 파일)을 컴파일하려면, 소스에서 빌드하기 문서를 확인하십시오. DLL 파일이 PHP 배포판이나 PECL에 존재하지 않는다면, 그 확장을 사용하기 전에 컴파일해야 합니다.

add a note add a note

User Contributed Notes 3 notes

up
5
peteb at airpost dot net
1 year ago
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:\windows
This 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.
up
-2
Robert Dinion
4 years ago
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"
up
-4
Chris
4 years ago
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!
To Top