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

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