Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

function.wincache-ucache-set fails to store array

オープン
#27 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
php
領域
backend

調査の方向性

wincache_ucache_set のマニュアルページと、issue に示されている PHP 8.4/IIS での再現から始めてください。配列のシリアライズが正しく文書化されているかを確認し、そのうえで、適切な対応がドキュメントの修正なのか、wincache の実装へのエスカレーションなのかを判断してください。担当と必要な変更が明確になった時点で issue は完了です。

索引モデルが issue の本文から書いたものです。

説明

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.


主要言語
XML
スター
3
フォーク
6
平均マージ
2日 16時間
マージ済み PR(30日)
6

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

php/doc-extensions のほかの issue

php/doc-extensions の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。