Skip to content

Conversation

@cmb69
Copy link
Member

@cmb69 cmb69 commented Aug 4, 2020

Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request. And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a PHP_INI_ALL setting.


I'm not sure what to do with the cached parameter of php_com_load_typelib_via_cache(); it's no longer needed after this change, but the function is exported, although it is declared in the internal header. Maybe just stick with the param for PHP 7, and remove for PHP 8?

I'm also not sure if it's worth writing a PHPT, because that would likely require the built-in webserver to be able to do multiple requests.

Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request.  And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.
@nikic
Copy link
Member

nikic commented Aug 5, 2020

Can't really comment on the change itself...

I'm not sure what to do with the cached parameter of php_com_load_typelib_via_cache(); it's no longer needed after this change, but the function is exported, although it is declared in the internal header. Maybe just stick with the param for PHP 7, and remove for PHP 8?

Yes, let's do that to be on the safe side.

I'm also not sure if it's worth writing a PHPT, because that would likely require the built-in webserver to be able to do multiple requests.

We should probably add some kind of facility for this (cgi has -T mode that can be used...), but for now I agree.

@cmb69
Copy link
Member Author

cmb69 commented Aug 11, 2020

Thanks! Applied as dc108fe. I'll follow up with a commit to remove the cached parameter for the "master" branch only.

@cmb69 cmb69 closed this Aug 11, 2020
@cmb69 cmb69 deleted the cmb/48585 branch August 11, 2020 09:31
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.

2 participants