amphp / ext-uv

Other
188 stars 28 forks source link

Help Please - Won't Install on Windows 10 #97

Closed amiga-500 closed 3 years ago

amiga-500 commented 3 years ago

So i want to install the UV extension on Windows.

I am using: PHP v7.4.16 (NTS VC 2017 x64)

I installed this extension: php_uv-0.2.4-7.4-nts-vc15-x64.zip found here: https://windows.php.net/downloads/pecl/releases/uv/0.2.4/

  1. It's not a permission issue. The dll is set to the group: Everyone with "Full Control".
  2. I have installed other extensions before. I always make sure they are NTS x64. No problems ever.
  3. In my php.ini i have tried: extension=uv extension="C:\php\ext\php_uv.dll"
  4. In php.ini my extension_dir is set correctly: extension_dir="C:\php\ext"
  5. No server is running. I am just using php via cli.
  6. I tried downgrading to php 7.2 and 7.3 and trying out the uv extension (using the correct version for that php version) and they too dont work (same error messages in 7.2 and 7.3).

The error message is: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_uv.dll' (tried: C:\php\ext\php_uv.dll (The specified module could not be found.)

Any time i get this kind of issue it is because i am using the wrong dll version. However, as you can see from my PHP version and the dll they are the same.

Just in case here is my Properties window for the php_uv.dll: Image

And i already have VS 2015 Redistribution installed, among the various other years. And most of my extensions are vc15 so i doubt its related to my PHP being compiled via vc2017 and the extension being vc2015.

In the zip it includes: libuv.dll libuv.pdb php_uv.dll php_uv.pdb

I would assume the only relevant ones i need are: php_uv.dll and php_uv.pdb which i copy into my C:\php\ext directory. Nothing else. Must i maybe copy the libuv.dll and libuv.pdb somehwere else???

TheTechsTech commented 3 years ago

yes, you need libuv.dll in directory C:\php\

amiga-500 commented 3 years ago

Yup i tried. still didn't work for me. same error.

TheTechsTech commented 3 years ago

I am using: PHP v7.4.16 (NTS VC 2017 x64)

I guess it's your version of VC 2017 x64, you might need to try building the extension, or use per-built PHP v7.4 binaries.

amiga-500 commented 3 years ago

I ended up reading thru and discovering an old bug in the author's C code. So I fixed it and now my problem is resolved. Works perfectly now. So it had nothing to do with using vc2017 nor any other assumption i had. I will likely post a Pull Request when i am free.

Appreciate your reply nonetheless. Have a great day.