Forum

Yampiz Forum

Sharing let knowledge Spreaded, Reading let spirits growth, Creative let culture extended, Let us
  • 禁止廣告文
  • 知識傳播
  • 閱讀
  • 心靈成長
  • 創作
  • 文化傳承
Dictionary / Programming / 網頁/網站程式 / PHP /

unserialize() 偏移錯誤

New Subject
Random
Previous
Next
|
    unserialize() 偏移錯誤

    ???今天遇到一個很奇怪的題,訊息如下

    Notice: unserialize(): Error at offset 76 of 82 bytes

    發生的情況是在為一個文件檔serialize()之後存檔,接著再從檔案中讀取出來,在讀取時就發生了這個問題,而且是只發生在新檔案內容比舊檔內容多的時侯。

    一開始以為是 flock 的問題,後來發現有沒有用 flock 都一樣,但是用 Ajax 第二次作讀取的動作就正常,也就是說,在同一支程序裡,寫完檔案後再將同一個檔案讀出來,在程序結束以前都會是原先檔案的內容長度,但是內容卻是新的檔案內容,所以才會出現明明定義有 50 個字,實際上字串只有 40 個字,所以在串列記錄裡的長度欄( 76 的位罝)就會報錯囉,而 82 是舊檔的長度!

    推論是 PHP 本身的 Bug ,同一程序同檔案寫入讀出,檔案的長度資訊出了問題,但不確定,有請各方高手賜教,

    • Keywords : flock, 長度資訊出, 請各方高手賜教, 舊檔內容多, 程序結束以前, 檔案讀出來, 新檔案內容, 文件檔serialize, 才會出現明明定義, 就會報錯囉, 實際上字串只, 同一程序同檔案寫入讀出, 動作就正常, 再從檔案中讀取出來, 串列記錄裡, unserialize, offset, bytes, Notice, Error
    00
    2009-10-23T18:59:37+0000
    ???伽 籟 kk7417 台 灣 找 小 姐 鮑 魚 外 送 奶 水 媽 媽 淫 蕩 人 妻 重 口 味 熟 女 長 腿 大 奶 麻 豆 巨 乳 學 生 妹 黑 絲 O L 處 女 白 虎 奶 水 媽 媽 無 套 內 射 肛 交 6 9 毒 龍 車 震 吃 精 液 伽 籟 kk7417 台 灣 找 小 姐 鮑 魚 外 送 奶 水 媽 媽 淫 蕩 人 妻 重 口 味 熟 女 長 腿 大 奶 麻 豆 巨 乳 學 生 妹 黑 絲 O L 處 女 白 虎 奶 水 媽 媽 無 套 內 射 肛 交 6 9 毒 龍 車 震 吃 精 液 伽 籟 kk7417 台 灣 找 小 姐 鮑 魚 外 送 奶 水 媽 媽 淫 蕩 人 妻 重 口 味 熟 女 長 腿 大 奶 麻 豆 巨 乳 學 生 妹 黑 絲 O L 處 女 白 虎 奶 水 媽 媽 無 套 內 射 肛 交 6 9 毒 龍 車 震 吃 精 液
    00
    2022-03-21T14:19:32+0000


    • Now, you can post comments by Facebook Account when your Yampiz account was logout or unvariable. whatever, we suggest to post comment by Yampiz Account to get more bounds to join new events of Heyxu
    Comment
     
    Verify
    Comment

    Facebook Page

    QR-Code and APP Launcher

    User Guide
    This Webpage

    In those service tabs, "Scan QRCode, in mobile device" or "Click the button, in this device" to open webpage or APP-related operations.
    QRCode
    • Auto Platform
      For better browsing experience, it will auto detects your device to display webpage.
    • Bug Report
      Tell us about the idea, problem and errors you found.
    • Comodo Secure
      The sensitive data transmission adopts by SSL-2048 authenticated encryption.
    • Copyright
      © 2009 YamPiz Digital Inc. & Jaby Group. All rights reserved.
    • Revised Version
      V2.2.552
      05 Dec 2025 (GMT+8)