Skip to content

Conversation

@hyh19962008
Copy link

@hyh19962008 hyh19962008 commented Jun 19, 2025

The current search paths start with "/usr/local", which is an illegal path on Windows.
That means enchant will not be able to find any broker or dict, resulting in enchant_broker_describe() and enchant_broker_list_dicts() always return empty array in php.

I replace them with relative paths, so that they can work with the file structure of the current release tarball.

- php.exe
-- lib\enchant-2\libenchant2_hunspell.dll
-- share\enchant\hunspell\en_US.aff
-- share\enchant\hunspell\en_US.dic

@cmb69
Copy link
Member

cmb69 commented Jun 19, 2025

/usr/local is a legal path on Windows; it is a relative path from the root of the current drive. Given that this path is documented, it might not be the best idea to change it.

@hyh19962008
Copy link
Author

OK, I see. But I still think it's more intuitive and more natural to place all the runtime files under the main PHP folder. After all, this is the Windows way.
People would have to spend half an hour trying to figure it out how to get it work given that they haven't read that document already. Perhaps we can change it in the next big release.

@Lolosan
Copy link

Lolosan commented Jul 23, 2025

While documented, it makes no sense to hardcode paths like this.

With relative paths, everything works fine after extension activated in php.ini. Like any other extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants