Try adding these lines to the top of the page and errors and warnings should be shown. Copying, pasting and searching the displayed errors will no doubt supply numerous solutions.
<?php
// Remove when onlinedeclare (strict_types=1);
error_reporting(-1); // maximum errors
ini_set('display_errors', 'true'); // displayy on screen
$filename = '/images/minis/newfolder';
$success = mkdir($filename, 0777, true);
if($success && file_exists($filename)) {
echo 'no problem';
}
// Errors and warnings will appear here
Specifically: The PHP user that the command is being run under doesn’t have write access to /.
Keep in mind that mkdir is a filepath manipulating command. If your web document root is in /var/www/html/mysite, then "/images" does NOT refer to /var/www/html/mysite/images in this context.