File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / rfc1867_sid_post.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:42 2012 UTC (12 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

    1: --TEST--
    2: session rfc1867 sid post
    3: --INI--
    4: file_uploads=1
    5: error_reporting=E_ALL&~E_NOTICE
    6: comment=debug builds show some additional E_NOTICE errors
    7: upload_max_filesize=1024
    8: session.save_path=
    9: session.name=PHPSESSID
   10: session.use_cookies=1
   11: session.use_only_cookies=0
   12: session.upload_progress.enabled=1
   13: session.upload_progress.cleanup=0
   14: session.upload_progress.prefix=upload_progress_
   15: session.upload_progress.name=PHP_SESSION_UPLOAD_PROGRESS
   16: session.upload_progress.freq=0
   17: --SKIPIF--
   18: <?php include('skipif.inc'); ?>
   19: --POST_RAW--
   20: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
   21: -----------------------------20896060251896012921717172737
   22: Content-Disposition: form-data; name="PHPSESSID"
   23: 
   24: rfc1867-tests
   25: -----------------------------20896060251896012921717172737
   26: Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
   27: 
   28: rfc1867_sid_post.php
   29: -----------------------------20896060251896012921717172737
   30: Content-Disposition: form-data; name="file1"; filename="file1.txt"
   31: 
   32: 1
   33: -----------------------------20896060251896012921717172737
   34: Content-Disposition: form-data; name="file2"; filename="file2.txt"
   35: 
   36: 2
   37: -----------------------------20896060251896012921717172737--
   38: --FILE--
   39: <?php
   40: session_start();
   41: var_dump(session_id());
   42: var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
   43: var_dump($_FILES);
   44: var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
   45: session_destroy();
   46: ?>
   47: --EXPECTF--
   48: string(%d) "rfc1867-tests"
   49: bool(true)
   50: array(2) {
   51:   [%u|b%"file1"]=>
   52:   array(5) {
   53:     [%u|b%"name"]=>
   54:     %string|unicode%(9) "file1.txt"
   55:     [%u|b%"type"]=>
   56:     %string|unicode%(0) ""
   57:     [%u|b%"tmp_name"]=>
   58:     %string|unicode%(%d) "%s"
   59:     [%u|b%"error"]=>
   60:     int(0)
   61:     [%u|b%"size"]=>
   62:     int(1)
   63:   }
   64:   [%u|b%"file2"]=>
   65:   array(5) {
   66:     [%u|b%"name"]=>
   67:     %string|unicode%(9) "file2.txt"
   68:     [%u|b%"type"]=>
   69:     %string|unicode%(0) ""
   70:     [%u|b%"tmp_name"]=>
   71:     %string|unicode%(%d) "%s"
   72:     [%u|b%"error"]=>
   73:     int(0)
   74:     [%u|b%"size"]=>
   75:     int(1)
   76:   }
   77: }
   78: array(5) {
   79:   [%u|b%"start_time"]=>
   80:   int(%d)
   81:   [%u|b%"content_length"]=>
   82:   int(%d)
   83:   [%u|b%"bytes_processed"]=>
   84:   int(%d)
   85:   [%u|b%"done"]=>
   86:   bool(true)
   87:   [%u|b%"files"]=>
   88:   array(2) {
   89:     [0]=>
   90:     array(7) {
   91:       [%u|b%"field_name"]=>
   92:       %unicode|string%(5) "file1"
   93:       [%u|b%"name"]=>
   94:       %unicode|string%(9) "file1.txt"
   95:       [%u|b%"tmp_name"]=>
   96:       %unicode|string%(%d) "%s"
   97:       [%u|b%"error"]=>
   98:       int(0)
   99:       [%u|b%"done"]=>
  100:       bool(true)
  101:       [%u|b%"start_time"]=>
  102:       int(%d)
  103:       [%u|b%"bytes_processed"]=>
  104:       int(1)
  105:     }
  106:     [1]=>
  107:     array(7) {
  108:       [%u|b%"field_name"]=>
  109:       %unicode|string%(5) "file2"
  110:       [%u|b%"name"]=>
  111:       %unicode|string%(9) "file2.txt"
  112:       [%u|b%"tmp_name"]=>
  113:       %unicode|string%(%d) "%s"
  114:       [%u|b%"error"]=>
  115:       int(0)
  116:       [%u|b%"done"]=>
  117:       bool(true)
  118:       [%u|b%"start_time"]=>
  119:       int(%d)
  120:       [%u|b%"bytes_processed"]=>
  121:       int(1)
  122:     }
  123:   }
  124: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>