Search notes:

PowerShell: the preference variable $MaximumVariableCount

The preference variable $maximumVariableCount specifies how many user-defined variables are allowed in a session.
The default value is 4096.
The following snippet is likely to hit the error message Cannot create variable var_4049 because variable capacity 4096 is exceeded for this scope:
for ($i = 0; $i -lt $maximumVariableCount; $i++) {
   invoke-expression "`$var_$i = $i"
}

See also

Preference variables

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1758206438, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/variable/preference/MaximumVariableCount(45): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78