summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2018-05-07 14:42:51 +0200
committerAnatol Belski <ab@php.net>2018-05-07 14:42:51 +0200
commit8ad44700cf4b9b335ea45df292a1f762e97336a2 (patch)
tree6af3e360a689585ba25c562ee290bdac5f18624c
parent637e47a5ed5e0d3b99791849d7fae27f26e99b9d (diff)
parentea642026ebb64e1ff42a97db7c4f9bf750bee578 (diff)
downloadphp-git-8ad44700cf4b9b335ea45df292a1f762e97336a2.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Update _bits_per_char to use with new PHP 7.1. or greater
-rw-r--r--ext/session/mod_files.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/session/mod_files.sh b/ext/session/mod_files.sh
index 39b7292920..9b24ef55fb 100644
--- a/ext/session/mod_files.sh
+++ b/ext/session/mod_files.sh
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
if [[ "$2" = "" ]] || [[ "$3" = "" ]]; then
- echo "Usage: $0 BASE_DIRECTORY DEPTH HASH_BITS"
+ echo "Usage: $0 BASE_DIRECTORY DEPTH BITS_PER_CHAR"
echo "BASE_DIRECTORY will be created if it doesn't exist"
echo "DEPTH must be an integer number >0"
- echo "HASH_BITS(session.hash_bits_per_character) should be one of 4, 5, or 6"
+ echo "BITS_PER_CHAR(session.sid_bits_per_character) should be one of 4, 5, or 6."
+ # http://php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character
exit 1
fi
@@ -18,15 +19,15 @@ fi
directory="$1"
depth="$2"
-hashbits="$3"
+bitsperchar="$3"
hash_chars="0 1 2 3 4 5 6 7 8 9 a b c d e f"
-if [[ "$hashbits" -ge "5" ]]; then
+if [[ "$bitsperchar" -ge "5" ]]; then
hash_chars="$hash_chars g h i j k l m n o p q r s t u v"
fi
-if [[ "$hashbits" -ge "6" ]]; then
+if [[ "$bitsperchar" -ge "6" ]]; then
hash_chars="$hash_chars w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - ,"
fi
@@ -56,10 +57,10 @@ if [[ ! -d $directory ]]; then
fi
-echo "Creating session path in $directory with a depth of $depth for session.hash_bits_per_character = $hashbits"
+echo "Creating session path in $directory with a depth of $depth for session.sid_bits_per_character = $bitsperchar"
for i in $hash_chars; do
newpath="$directory/$i"
mkdir $newpath || exit 1
- bash $0 $newpath `expr $depth - 1` $hashbits recurse
+ bash $0 $newpath `expr $depth - 1` $bitsperchar recurse
done