File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / session / tests / rfc1867_sid_get.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 get
    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: --GET--
   20: PHPSESSID=rfc1867-tests
   21: --POST_RAW--
   22: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
   23: -----------------------------20896060251896012921717172737
   24: Content-Disposition: form-data; name="PHPSESSID"
   25: 
   26: rfc1867-tests-post
   27: -----------------------------20896060251896012921717172737
   28: Content-Disposition: form-data; name="PHP_SESSION_UPLOAD_PROGRESS"
   29: 
   30: rfc1867_sid_get.php
   31: -----------------------------20896060251896012921717172737
   32: Content-Disposition: form-data; name="file1"; filename="file1.txt"
   33: 
   34: 1
   35: -----------------------------20896060251896012921717172737
   36: Content-Disposition: form-data; name="file2"; filename="file2.txt"
   37: 
   38: 2
   39: -----------------------------20896060251896012921717172737--
   40: --FILE--
   41: <?php
   42: session_start();
   43: var_dump(session_id());
   44: var_dump(basename(__FILE__) == $_POST[ini_get("session.upload_progress.name")]);
   45: var_dump($_FILES);
   46: var_dump($_SESSION["upload_progress_" . basename(__FILE__)]);
   47: session_destroy();
   48: ?>
   49: --EXPECTF--
   50: string(%d) "rfc1867-tests"
   51: bool(true)
   52: array(2) {
   53:   [%u|b%"file1"]=>
   54:   array(5) {
   55:     [%u|b%"name"]=>
   56:     %string|unicode%(9) "file1.txt"
   57:     [%u|b%"type"]=>
   58:     %string|unicode%(0) ""
   59:     [%u|b%"tmp_name"]=>
   60:     %string|unicode%(%d) "%s"
   61:     [%u|b%"error"]=>
   62:     int(0)
   63:     [%u|b%"size"]=>
   64:     int(1)
   65:   }
   66:   [%u|b%"file2"]=>
   67:   array(5) {
   68:     [%u|b%"name"]=>
   69:     %string|unicode%(9) "file2.txt"
   70:     [%u|b%"type"]=>
   71:     %string|unicode%(0) ""
   72:     [%u|b%"tmp_name"]=>
   73:     %string|unicode%(%d) "%s"
   74:     [%u|b%"error"]=>
   75:     int(0)
   76:     [%u|b%"size"]=>
   77:     int(1)
   78:   }
   79: }
   80: array(5) {
   81:   [%u|b%"start_time"]=>
   82:   int(%d)
   83:   [%u|b%"content_length"]=>
   84:   int(%d)
   85:   [%u|b%"bytes_processed"]=>
   86:   int(%d)
   87:   [%u|b%"done"]=>
   88:   bool(true)
   89:   [%u|b%"files"]=>
   90:   array(2) {
   91:     [0]=>
   92:     array(7) {
   93:       [%u|b%"field_name"]=>
   94:       %unicode|string%(5) "file1"
   95:       [%u|b%"name"]=>
   96:       %unicode|string%(9) "file1.txt"
   97:       [%u|b%"tmp_name"]=>
   98:       %unicode|string%(%d) "%s"
   99:       [%u|b%"error"]=>
  100:       int(0)
  101:       [%u|b%"done"]=>
  102:       bool(true)
  103:       [%u|b%"start_time"]=>
  104:       int(%d)
  105:       [%u|b%"bytes_processed"]=>
  106:       int(1)
  107:     }
  108:     [1]=>
  109:     array(7) {
  110:       [%u|b%"field_name"]=>
  111:       %unicode|string%(5) "file2"
  112:       [%u|b%"name"]=>
  113:       %unicode|string%(9) "file2.txt"
  114:       [%u|b%"tmp_name"]=>
  115:       %unicode|string%(%d) "%s"
  116:       [%u|b%"error"]=>
  117:       int(0)
  118:       [%u|b%"done"]=>
  119:       bool(true)
  120:       [%u|b%"start_time"]=>
  121:       int(%d)
  122:       [%u|b%"bytes_processed"]=>
  123:       int(1)
  124:     }
  125:   }
  126: }

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