Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Strange behaviour
https://www.tinywebgallery.com/forum/viewtopic.php?f=13&t=3500
Page 1 of 1

Author:  rokmail [ 22. Feb 2013, 15:41 ]
Post subject:  Strange behaviour

Hello,

Thanks for a really great product!

I have a following problem:

I have 4 photos. Each less than 500kb size. Named DSC01.JPG, DSC02.JPG, DSC04.JPG and DSC04.JPG.
I'm experimenting with this photos.

When uploading each of them one by one then all is good. But when I'm uploading all 4 photos at once I see very frustrating results. Sometimes 3 of photos are uploading correctly, sometimes 2, sometimes only 1. A have enabled logs both in config and in tfu_upload.php but cannot see no errors

My web server is nginx, PHP 5.3.15, fastcgi. Centos 5


Another point is that the same website works good on my local machine with windows, apache and PHP 5.4

Please assist

Thank you


PS Cannot attach a file....
Code:
02.22.2013 15:17:13 - 1. Config loaded
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:44:tfu_debug:1. Config loaded
Current memory usage: 402 KB
02.22.2013 15:17:13 - session id : 9q0kdkop3rt53io62l9vst2q84
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:51:tfu_debug:session id : 9q0kdkop3rt53io62l9vst2q84
Current memory usage: 402 KB
02.22.2013 15:17:13 - session TFU: 9q0kdkop3rt53io62l9vst2q84
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:52:tfu_debug:session TFU: 9q0kdkop3rt53io62l9vst2q84
Current memory usage: 402 KB
02.22.2013 15:17:13 - login: true
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:53:tfu_debug:login: true
Current memory usage: 402 KB
02.22.2013 15:17:13 - dir: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:54:tfu_debug:dir: ./../../../../images/test
Current memory usage: 402 KB
02.22.2013 15:17:13 - 2. Authenification sucessfull
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:60:tfu_debug:2. Authenification sucessfull
Current memory usage: 402 KB
02.22.2013 15:17:13 - 3. Directory read: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:62:tfu_debug:3. Directory read: ./../../../../images/test
Current memory usage: 402 KB
02.22.2013 15:17:13 - 3a. $_FILES content:
Array
(
[Filedata] => Array
(
[name] => DSC01.JPG
[type] => application/octet-stream
[tmp_name] => /tmp/phpspInnb
[error] => 0
[size] => 462296
)

)

Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:76:tfu_debug:3a. $_FILES content:
Array
(
[Filedata] => Array
(
[name] => DSC01.JPG

Current memory usage: 403 KB
02.22.2013 15:17:13 - 4. Check valid extension: DSC01.JPG
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:87:tfu_debug:4. Check valid extension: DSC01.JPG
Current memory usage: 403 KB
02.22.2013 15:17:13 - 4a. Extension valid.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:89:tfu_debug:4a. Extension valid.
Current memory usage: 403 KB
02.22.2013 15:17:13 - 5. Before move_uploaded_file : /tmp/phpspInnb -> ./__/__/__/__/images/test/DSC01.JPG
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:113:tfu_debug:5. Before move_uploaded_file : /tmp/phpspInnb -> ./../../../../images/test/DSC01.JPG
Current memory usage: 404 KB
02.22.2013 15:17:13 - 5a. After move_uploaded_file.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:125:tfu_debug:5a. After move_uploaded_file.
Current memory usage: 403 KB
02.22.2013 15:17:13 - 6. Uploaded.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:146:tfu_debug:6. Uploaded.
Current memory usage: 403 KB
02.22.2013 15:17:13 - 7. Internal processing done.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:179:tfu_debug:7. Internal processing done.
Current memory usage: 403 KB
02.22.2013 15:17:13 - 9. End upload
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:246:tfu_debug:9. End upload
Current memory usage: 404 KB
02.22.2013 15:17:13 - 10. End store session
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&firstStart=true&zeit=1361531835951&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=4/
Stack: tfu_upload.php:248:tfu_debug:10. End store session
Current memory usage: 404 KB
02.22.2013 15:17:13 - Action:dir; Directory: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_file.php?action=dir&dir=&ts=1361531836944&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&tfu_ut=0&TFUSESSID=9q0kdkop3rt53io62l9vst2q84
Stack: tfu_file.php:49:tfu_debug:Action:dir; Directory: ./../../../../images/test
Current memory usage: 402 KB
02.22.2013 15:17:13 - Action:dir; Directory: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_file.php?action=dir&dir=&ts=1361531837745&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&tfu_ut=0&TFUSESSID=9q0kdkop3rt53io62l9vst2q84
Stack: tfu_file.php:49:tfu_debug:Action:dir; Directory: ./../../../../images/test
Current memory usage: 403 KB
02.22.2013 15:17:14 - Action:dir; Directory: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_file.php?action=dir&dir=&ts=1361531838426&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&tfu_ut=0&TFUSESSID=9q0kdkop3rt53io62l9vst2q84
Stack: tfu_file.php:49:tfu_debug:Action:dir; Directory: ./../../../../images/test
Current memory usage: 403 KB
02.22.2013 15:17:15 - 1. Config loaded
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:44:tfu_debug:1. Config loaded
Current memory usage: 402 KB
02.22.2013 15:17:15 - session id : 9q0kdkop3rt53io62l9vst2q84
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:51:tfu_debug:session id : 9q0kdkop3rt53io62l9vst2q84
Current memory usage: 403 KB
02.22.2013 15:17:15 - session TFU: 9q0kdkop3rt53io62l9vst2q84
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:52:tfu_debug:session TFU: 9q0kdkop3rt53io62l9vst2q84
Current memory usage: 402 KB
02.22.2013 15:17:15 - login: true
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:53:tfu_debug:login: true
Current memory usage: 402 KB
02.22.2013 15:17:15 - dir: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:54:tfu_debug:dir: ./../../../../images/test
Current memory usage: 402 KB
02.22.2013 15:17:15 - 2. Authenification sucessfull
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:60:tfu_debug:2. Authenification sucessfull
Current memory usage: 402 KB
02.22.2013 15:17:15 - 3. Directory read: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:62:tfu_debug:3. Directory read: ./../../../../images/test
Current memory usage: 403 KB
02.22.2013 15:17:15 - 3a. $_FILES content:
Array
(
[Filedata] => Array
(
[name] => DSC04.JPG
[type] => application/octet-stream
[tmp_name] => /tmp/phpZuYNJq
[error] => 0
[size] => 305968
)

)

Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:76:tfu_debug:3a. $_FILES content:
Array
(
[Filedata] => Array
(
[name] => DSC04.JPG

Current memory usage: 404 KB
02.22.2013 15:17:15 - 4. Check valid extension: DSC04.JPG
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:87:tfu_debug:4. Check valid extension: DSC04.JPG
Current memory usage: 403 KB
02.22.2013 15:17:15 - 4a. Extension valid.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:89:tfu_debug:4a. Extension valid.
Current memory usage: 403 KB
02.22.2013 15:17:15 - 5. Before move_uploaded_file : /tmp/phpZuYNJq -> ./__/__/__/__/images/test/DSC04.JPG
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:113:tfu_debug:5. Before move_uploaded_file : /tmp/phpZuYNJq -> ./../../../../images/test/DSC04.JPG
Current memory usage: 404 KB
02.22.2013 15:17:15 - 5a. After move_uploaded_file.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:125:tfu_debug:5a. After move_uploaded_file.
Current memory usage: 404 KB
02.22.2013 15:17:15 - 6. Uploaded.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:146:tfu_debug:6. Uploaded.
Current memory usage: 404 KB
02.22.2013 15:17:15 - 7. Internal processing done.
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:179:tfu_debug:7. Internal processing done.
Current memory usage: 404 KB
02.22.2013 15:17:15 - 9. End upload
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:246:tfu_debug:9. End upload
Current memory usage: 404 KB
02.22.2013 15:17:15 - 10. End store session
Request: /administrator/components/com_jfuploader/tfu/tfu_upload.php?dir=&TFUSESSID=9q0kdkop3rt53io62l9vst2q84&PHPSESSID=9q0kdkop3rt53io62l9vst2q84&size=100000&zeit=1361531838427&tfu_rn=1364333498181771606041533969388&tfu_is_flash_10=1&remaining=1/
Stack: tfu_upload.php:248:tfu_debug:10. End store session
Current memory usage: 404 KB
02.22.2013 15:17:15 - Action:dir; Directory: ./__/__/__/__/images/test
Request: /administrator/components/com_jfuploader/tfu/tfu_file.php?action=dir&dir=&ts=1361531839173&tfu_rn=1364333498181771606041531838427&tfu_is_flash_10=1&tfu_ut=5&check_upload=true&TFUSESSID=9q0kdkop3rt53io62l9vst2q84
Stack: tfu_file.php:49:tfu_debug:Action:dir; Directory: ./../../../../images/test
Current memory usage: 403 KB

Author:  TinyWebGallery [ 22. Feb 2013, 16:03 ]
Post subject:  Re: Strange behaviour

Seems to be a problem of resources.
Is the upload temp folder maybe already full? This is set by php. Maybe you can define a different local path.

Best,
Michael

Author:  rokmail [ 22. Feb 2013, 16:55 ]
Post subject:  Re: Strange behaviour

While debugging I've found, that code hangs on the line 1540 in tfu_helper.php (die ("Invalid Request")):

Code:
function checkrequest() {
    if (!isset($_SESSION['TFU_RH'])) {
        $_SESSION['TFU_RH'] = array();
        return;
    } else {
        if (isset($_GET['ts']) || isset($_GET['zeit'])) {
            $requesthashes = $_SESSION['TFU_RH'];
            $hashrequest =  isset($_GET['zeit']) ? $_GET['zeit'] : $_GET['ts'];
            if (isset($requesthashes[$hashrequest]) || strlen($hashrequest) != 13) {
                die ("Invalid Request");
            }
            $requesthashes[$hashrequest] = $hashrequest;
            $_SESSION['TFU_RH'] = $requesthashes;
        }
    }
}



If I disable checkrequest(); call at the end off restore_temp_session function then uploading works good. As I understand, "checkrequest" checks for suspicious requests, right? What is the rishk of disabling it?

Thanks again?
Roman

Author:  TinyWebGallery [ 22. Feb 2013, 17:09 ]
Post subject:  Re: Strange behaviour

Is the upload of the 1-3 files very fast?

This function checks that each request is only submitted once. So that if someone logs your request he cannot use them again.

Best,
Michael

Author:  rokmail [ 22. Feb 2013, 17:29 ]
Post subject:  Re: Strange behaviour

In the situation I described in first message, files 1 and 4 uploaded as usual, but 2 and 3 were skipped as I understand. You can see it in log.

In addition sometimes I got following error in log:
Code:
02.22.2013 19:24:19 - Security tokens did not match. No further actions are allowed.
Request: /administrator/components/com_jfuploader/tfu/tfu_file.php?action=dir&dir=&ts=1361546664044&tfu_rn=1364887435664745389581546663563&tfu_is_flash_10=1&tfu_ut=5&check_upload=true&TFUSESSID=9q0kdkop3rt53io62l9vst2q84
Stack: tfu_helper.php:1411:tfu_debug:Security tokens did not match. No further actions are allowed.
Stack: tfu_file.php:228:checkSessionTempDir:5

After that error flash stops working.

Author:  TinyWebGallery [ 23. Feb 2013, 19:45 ]
Post subject:  Re: Strange behaviour

I think I know what the problem is. The time in the flash is not changing at every upload if the upload is very fast.
I'll add an additional parameter for the check.

I'll let you know when this is done.

Best,
Michael

Author:  TinyWebGallery [ 24. Feb 2013, 01:07 ]
Post subject:  Re: Strange behaviour

can I send you a fixed version and you do your tests again?
Because on my systems this does not happen.

Best,
Michael

Author:  TinyWebGallery [ 26. Feb 2013, 00:08 ]
Post subject:  Re: Strange behaviour

Any feedback for my new version?

Best, Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/