php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59517 Upload progress broken
Submitted: 2010-11-19 10:02 UTC Modified: 2010-11-28 08:44 UTC
From: gabriel at justbull dot com Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.3.2 OS: Centos 5.5
Private report: No CVE-ID: None
 [2010-11-19 10:02 UTC] gabriel at justbull dot com
Description:
------------
I am using PHP 5.3.3 but your form didn't have the option so I 
put 5.3.2.

The upload progress tracking doesn't work with APC 3.1.5,

I tried on multiple servers, all running Centos 5.4 or 5.5 and 
got the same results.

I needed to downgrade to APC 3.1.4 or APC 3.0.9.

Of course the settings of apc.ini were correct.

Reproduce code:
---------------
apc_fetch('upload_' . $_GET['key']);

Expected result:
----------------
array("total"=>xxx,"current"=>xxx,"filename"=>xxx,"name"=>xxx,
"done"=>xxx,"start_time"=>xxx)

Actual result:
--------------
false

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-20 03:18 UTC] fedora at famillecollet dot com
With php5.3.4 (201011111730) + APC 3.1.4 upload progress return correct information (but sometime cause segfault on first call)

With php5.3.4 (201011111730) + APC 3.1.4 upload progress don't return any information and cast a lot of warning.

PHP Warning:  Unknown: Potential cache slam averted for key 'upload_d1d1d989cddc6b8281e5cb49df9029ba' in Unknown on line 0
 [2010-11-20 03:44 UTC] fedora at famillecollet dot com
With apc-3.1.6-dev (expecially commit 305258), no more PHP Warning. But apache segfault (and, no upload information provided)
 [2010-11-24 08:18 UTC] kissifrot at gmail dot com
I have the same problem with the PHP 5.3.3 dotdeb package, which uses the released 3.1.5 version of APC.

apc_fetch() now always returns false :(
 [2010-11-24 08:19 UTC] kissifrot at gmail dot com
(forgot to specify I was running Debian Lenny)
 [2010-11-26 01:11 UTC] gopalv82 at yahoo dot com
Any update on that segv?

I have fixed the problem as such (i.e the slam_defense was 
preventing upload_progress from slamming the cache).

But I didn't see a segv at all.
 [2010-11-28 08:44 UTC] gopalv82 at yahoo dot com
http://news.php.net/php.pecl.cvs/14973

Please check again and if you've got a segv, please re-open with a back-trace.
 [2010-12-13 04:57 UTC] holger dot hees at maxvis dot de
i have got a segv with php 5.3.4 and apc 3.1.6

(gdb) bt full
#0  0x00007f25eab616a2 in strlen () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f25e7abbbbd in add_assoc_string_ex (arg=0x7f25ebfb8718, key=0x7f25e2ccfaf7 "temp_filename", key_len=14, str=0x0, duplicate=1)
    at /usr/src/debug/php-5.3.4/Zend/zend_API.c:1173
        __s = 0x0
        tmp = 0x7f25ebfb8880
#2  0x00007f25e2cc92f7 in apc_rfc1867_progress (event=<value optimized out>, event_data=0x7fff3a8726a0, extra=<value optimized out>)
    at /home/hhees/workspace/APC-3.1.6/apc_rfc1867.c:189
        track = 0x7f25ebfb8718
#3  0x00007f25e7a717c4 in rfc1867_post_handler (content_type_dup=<value optimized out>, arg=0x7f25ebfb5380) at /usr/src/debug/php-5.3.4/main/rfc1867.c:1137
        event_file_end = {post_bytes_processed = 6913, temp_filename = 0x0, cancel_upload = 4}
        pair = 0x7f25ebfb79a3 ""
        end = 0
        param = 0x7f25ebfb8278 "f[contact:image]"
        tmp = 0x0
        wlen = <value optimized out>
        buff = '\000' <repeats 16 times>, "\\O\207:\377\177\000\000\270\251\215\353\000\000\000\000\220<\207:\377\177\000\000\020\275\331\353%\177\000\000\001\000\000\000\000\000\000\000\373\215\344\352%\177\000\000\300<\207:\002\000\000\000@\000\000\000\000\000\000\000\330\016\344\352%\177\000\000\350\016\344\352%\177\000\000\000\000\000\000\000\000\000\000\070\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\230\016\344\352%\177\000\000`\000\000\000\000\000\000\000\360Q\207:\004\000\000\000`R\207:\377\177\000\000p\317p\343%\177\000\000\200\016\344\352%\177\000\000\070\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\260\t\220\353%\177\000\000\201\310G\352%\177\000\000\000\020\220\353%\177\000\000\370v\215\353%\177\000\000T\371n\353%\177\000\000\000\000\000\000\000\000\000\000\201\310G\352%\177\000\000\000\000\000\000\000\000\000\000\062\211n\353%\177\000\000\270\251\215\353%\177\000\000\260"...
        cd = 0x7f25ebfb7e67 ""
        filename = 0x7f25ebfb86f8 ""
        blen = 0
        offset = 0
        boundary = <value optimized out>
        s = <value optimized out>
        boundary_end = <value optimized out>
        start_arr = <value optimized out>
        array_index = 0x0
        temp_filename = 0x0
        lbuf = 0x0
        abuf = 0x0
        boundary_len = <value optimized out>
        total_bytes = 0
        cancel_upload = 4
        is_arr_upload = <value optimized out>
        array_len = 0
        max_file_size = 0
        skip_upload = 0
        anonindex = 0
        is_anonymous = 0
        http_post_files = 0x7f25ebfb6a68
        uploaded_files = <value optimized out>
        fd = -1
        header = {head = 0x7f25ebfb6b90, tail = 0x7f25ebfb7150, count = 2, size = 16, dtor = 0x7f25e7a6fe70 <php_free_hdr_entry>, persistent = 0 '\000', traverse_ptr = 0x0}
        event_extra_data = 0x0
        llen = 0
---Type <return> to continue, or q <return> to quit---
        upload_cnt = 20
#4  0x00007f25e7a6e540 in sapi_handle_post (arg=<value optimized out>) at /usr/src/debug/php-5.3.4/main/SAPI.c:121
No locals.
#5  0x00007f25e7a74f6f in php_default_treat_data (arg=0, str=0x0, destArray=0x7f25ebfb5380) at /usr/src/debug/php-5.3.4/main/php_variables.c:334
        res = 0x0
        var = <value optimized out>
        val = <value optimized out>
        separator = 0x0
        c_var = <value optimized out>
        array_ptr = 0x7f25ebfb5380
        free_buffer = 0
        strtok_buf = 0x0
#6  0x00007f25debbcdad in mbstr_treat_data (arg=0, str=0x0, destArray=0x0) at /usr/src/debug/php-5.3.4/ext/mbstring/mb_gpc.c:68
        res = 0x0
        separator = 0x0
        c_var = <value optimized out>
        array_ptr = <value optimized out>
        free_buffer = 0
        detected = <value optimized out>
        info = {data_type = -407452346, separator = 0x4 <Address 0x4 out of bounds>, force_register_globals = 0, report_errors = 0, to_language = mbfl_no_language_neutral, 
          to_encoding = -408471545, from_language = 32549, num_from_encodings = 1, from_encodings = 0x7f25e7b6d964}
#7  0x00007f25e7a7550b in php_hash_environment () at /usr/src/debug/php-5.3.4/main/php_variables.c:684
        p = 0x7f25e7b6c548 "PCS"
        jit_initialization = 0 '\000'
        auto_global_records = {{name = 0x7f25e7b55e24 "_POST", name_len = 6, long_name = 0x7f25e7b5c461 "HTTP_POST_VARS", long_name_len = 15, jit_initialization = 0 '\000'}, {
            name = 0x7f25e7b55e2f "_GET", name_len = 5, long_name = 0x7f25e7b5c470 "HTTP_GET_VARS", long_name_len = 14, jit_initialization = 0 '\000'}, {
            name = 0x7f25e7b4e343 "_COOKIE", name_len = 8, long_name = 0x7f25e7b5c47e "HTTP_COOKIE_VARS", long_name_len = 17, jit_initialization = 0 '\000'}, {
            name = 0x7f25e7b55e50 "_SERVER", name_len = 8, long_name = 0x7f25e7b5c49d "HTTP_SERVER_VARS", long_name_len = 17, jit_initialization = 1 '\001'}, {
            name = 0x7f25e7b55e46 "_ENV", name_len = 5, long_name = 0x7f25e7b5c48f "HTTP_ENV_VARS", long_name_len = 14, jit_initialization = 1 '\001'}, {
            name = 0x7f25e7b5c4ca "_FILES", name_len = 7, long_name = 0x7f25e7b5c4c1 "HTTP_POST_FILES", long_name_len = 16, jit_initialization = 0 '\000'}}
        i = 6
#8  0x00007f25e7a65c2d in php_request_startup () at /usr/src/debug/php-5.3.4/main/main.c:1440
        __orig_bailout = 0x7fff3a875360
        __bailout = {{__jmpbuf = {139800846696352, 6597430549481636108, 139800849843800, 0, -4294967295, 139800845181016, -6597565440629292788, -6501782318099873524}, 
            __mask_was_saved = 0, __saved_mask = {__val = {139800833635333, 0, 0, 139800849874288, 42, 5, 18446744073709551615, 139800849880832, 139800849843800, 
                139800780851840, 139800849843800, 139800780851840, 139800849877424, 0, 139800777893425, 139800846696352}}}}
        retval = 0
#9  0x00007f25e7b4ae86 in php_handler (r=0x7f25ebfe8658) at /usr/src/debug/php-5.3.4/sapi/apache2handler/sapi_apache2.c:620
        __orig_bailout = 0x0
        __bailout = {{__jmpbuf = {139800846696352, 6597430549481636108, 139800849843800, 0, -4294967295, 139800845181016, -6597565440602029812, -6501782481161305844}, 
            __mask_was_saved = 0, __saved_mask = {__val = {8192, 139800849810592, 139800828299945, 139800846554664, 139800849876760, 2, 139800849843672, 139800793571936, 
                139800787195369, 1095765325, 140734175335708, 46, 1, 5276914872, 139800845232208, 139796890545858}}}}
        ctx = 0x7f25ebff09b0
        conf = 0x7f25ebbe1b80
        brigade = 0x7f25ebff16a8
        bucket = <value optimized out>
        rv = <value optimized out>
        parent_req = 0x0
#10 0x00007f25eb947218 in ap_run_handler ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#11 0x00007f25eb947688 in ap_invoke_handler ()
No symbol table info available.
#12 0x00007f25eb955130 in ap_process_request ()
No symbol table info available.
#13 0x00007f25eb9521c8 in ?? ()
No symbol table info available.
#14 0x00007f25eb94de88 in ap_run_process_connection ()
No symbol table info available.
#15 0x00007f25eb959b8a in ?? ()
No symbol table info available.
#16 0x00007f25eb959e9a in ?? ()
No symbol table info available.
#17 0x00007f25eb959f57 in ?? ()
No symbol table info available.
#18 0x00007f25eb95a8a5 in ap_mpm_run ()
No symbol table info available.
#19 0x00007f25eb93218e in main ()
No symbol table info available.
 [2010-12-13 07:54 UTC] holger dot hees at maxvis dot de
the same with apc-3.1.7-dev
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 10:01:28 2024 UTC