PHPSDK-SETUP to set up an environment for building and testing PHP extensions on Windows.
The Project Is A Rewrite Of The Oreginal Project Setup PHP-SDK
git clone https://github.com/BbenWeb1/phpsdk-setup.git
- Open Folder phpsdk-setup With
PowerShell Windows
- Run File
.\setup-sdk
version
: the PHP version to build for (7.0
,7.1
,7.2
,7.3
,7.4
,8.0
,8.1
or8.2
)arch
: the architecture to build for (x64
orx86
)ts
: thread-safety (nts
orts
)
- Install Visual studio 19 In Windows
- Download OpenCV C++
https://github.com/spmallick/learnopencv/tree/master/Install-OpenCV-Windows-exe
and Extract Content ToC:\OpenCV
- Download And Setup
phpsdk-setup
(ExampleVersion:8.0
,arch:x64
,ts:ts
) - Download Git From
https://git-scm.com/downloads
and Install
- Open Folder phpsdk
- invoke
phpsdk-vc16-x64.bat
run
cd ext
git clone https://github.com/BbenWeb1/php-opencv.git
cd php-opencv
..\..\..\..\..\..\..\php-dev\phpize.bat
configure --help
configure --with-opencv
nmake
- Wait For The Installation To Finish
cd x64\Release_TS
Find Filephp_opencv.dll
- Copy File
php_opencv.dll
ToC:\xampp\php\ext
- Copy Files DLL From
C:\OpenCV\x64\vc16\bin
ToC:\xampp\php
- Open File php.ini
C:\xampp\php\php.ini
- Add
extension=php_opencv
and Save