Skip to content

Reinstalling or Uninstalling Windows extensions fails #190

@asgrim

Description

@asgrim

Reinstalling or uninstalling an extension in Windows does not work currently.

This is because when DLL is loaded in Windows, we cannot unload it from PHP in order to free Windows' lock on the file. If you attempt to overwrite or uninstall the DLL in Windows, you will get an unhelpful/cryptic error like:

PHP Warning:  copy(C:\tools\php\ext\php_example_pie_extension.dll): Failed to
open stream: Resource temporarily unavailable in src\Installing\WindowsInstall.php on line 127

(this specific error is trying to re-install an ext that is already installed)

After some searching, it seems this is because the DLL is loaded and therefore cannot be "written" whilst loaded. One potential solution here is to relaunch PHP without the extension loaded. I believe Composer has a mechanism to reload without xdebug (for performance) so it may be possible to leverage that.

Metadata

Metadata

Assignees

Labels

maintainer investigatingThis ticket is being investigated by maintainers. Please check with us before contributing PRs etc!

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions