function.wincache-ucache-set fails to store array
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with the wincache_ucache_set manual page and the PHP 8.4/IIS reproduction shown in the issue. Verify whether array serialization is documented correctly, then determine whether the appropriate outcome is a documentation correction or escalation to the wincache implementation; the issue is done when that ownership and required change are clear.
Written by the indexing model from the issue text.
Description
From manual page: https://www.php.net/manual/en/function.wincache-ucache-set.php
I've just spent a few hours trying to debug why an IIS server with wincache is hanging, and it all came down to 1 single line
This is a test line that can hang my Wincache / PHP 8.4 / IIS setup
$test_array = ['simple_string'];
$result = wincache_ucache_set('pjs_test_queue', $test_array, $expiration);
This is an array. I have many thousands of non-array items in there and Wordpress strings/articles etc., all in the same instance. No issues at all for anything else. But, add that array, and things just halt. The call never returns. This was a simple test array I did to attempt to replicate the issue. My array was only a few elements, but slightly more complicated. If you change the array to a string in the same code for sanity check, it works fine.
Now, the docs all say it is supposed to support this and internally serialise, but, something seems wrong with my builds, or the docs are not correct?
The fix? If you manually serialize the array FIRST, so
$result = wincache_ucache_set('pjs_test_queue', serialize($test_array), $expiration);
It'll work just fine.
So, I now have a work around and I will not trust the internal serialization that is supposed to happen, but I am reporting here in case it is a general bug that needs to be fixed. Obviously, very, very simple to replicate and test. 2 lines of code.
- Dominant language
- XML
- Stars
- 2
- Forks
- 6
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from php/doc-extensions
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
php/doc-extensions#23 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
php/doc-extensions#28 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
php/doc-extensions#22 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
php/doc-extensions#13 · 11 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
php/doc-extensions#21 · 1 comment ·
All issues in php/doc-extensions
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100