Shimmie is unable to find the composer vendor directory.
Have you followed the composer setup instructions found in the README?
If you are not intending to do any development with Shimmie, it is highly recommend you use one of the pre-packaged releases found on Github instead.
"); } // Pull in necessary files require_once "vendor/autoload.php"; global $_tracer; $_tracer = new EventTracer(); require_once "core/exceptions.php"; require_once "core/cacheengine.php"; require_once "core/dbengine.php"; require_once "core/database.php"; require_once "core/util.php"; $dsn = get_dsn(); if ($dsn) { do_install($dsn); } else { ask_questions(); } } function get_dsn() { if (getenv("INSTALL_DSN")) { $dsn = getenv("INSTALL_DSN");; } elseif (@$_POST["database_type"] == DatabaseDriver::SQLITE) { /** @noinspection PhpUnhandledExceptionInspection */ $id = bin2hex(random_bytes(5)); $dsn = "sqlite:data/shimmie.{$id}.sqlite"; } elseif (isset($_POST['database_type']) && isset($_POST['database_host']) && isset($_POST['database_user']) && isset($_POST['database_name'])) { $dsn = "{$_POST['database_type']}:user={$_POST['database_user']};password={$_POST['database_password']};host={$_POST['database_host']};dbname={$_POST['database_name']}"; } else { $dsn = null; } return $dsn; } function do_install($dsn) { try { create_dirs(); create_tables(new Database($dsn)); write_config($dsn); } catch (InstallerException $e) { exit_with_page($e->title, $e->body, $e->code); } } function ask_questions() { $warnings = []; $errors = []; if (check_gd_version() == 0 && check_im_version() == 0) { $errors[] = " No thumbnailers could be found - install the imagemagick tools (or the PHP-GD library, if imagemagick is unavailable). "; } elseif (check_im_version() == 0) { $warnings[] = " The 'convert' command (from the imagemagick package) could not be found - PHP-GD can be used instead, but the size of thumbnails will be limited. "; } if (!function_exists('mb_strlen')) { $errors[] = " The mbstring PHP extension is missing - multibyte languages (eg non-english languages) may not work right. "; } $drivers = PDO::getAvailableDrivers(); if ( !in_array(DatabaseDriver::MYSQL, $drivers) && !in_array(DatabaseDriver::PGSQL, $drivers) && !in_array(DatabaseDriver::SQLITE, $drivers) ) { $errors[] = " No database connection library could be found; shimmie needs PDO with either Postgres, MySQL, or SQLite drivers "; } $db_m = in_array(DatabaseDriver::MYSQL, $drivers) ? '' : ""; $db_p = in_array(DatabaseDriver::PGSQL, $drivers) ? '' : ""; $db_s = in_array(DatabaseDriver::SQLITE, $drivers) ? '' : ""; $warn_msg = $warnings ? "", $warnings) : ""; $err_msg = $errors ? "
", $errors) : "";
exit_with_page(
"Install Options",
<<
Please make sure the database you have chosen exists and is empty.
For SQLite the database name will be a filename on disk, relative to
where shimmie was installed.
Drivers can generally be downloaded with your OS package manager;
for Debian / Ubuntu you want php-pgsql, php-mysql, or php-sqlite.
Shimmie needs to have a 'data' folder in its directory, writable by the PHP user. If you see this error, if probably means the folder is owned by you, and it needs to be writable by the web server. PHP reports that it is currently running as user: ".get_current_user()." (". getmyuid() .") Once you have created this folder and / or changed the ownership of the shimmie folder, hit 'refresh' to continue. Please ensure that the database you are installing Shimmie with is empty before continuing. Once you have emptied the database of any tables, please hit 'refresh' to continue. An error occurred while trying to create the database tables necessary for Shimmie. Please check and ensure that the database configuration options are all correct. {$e->getMessage()} If you aren't redirected, click here to Continue."
);
} else {
$h_file_content = htmlentities($file_content);
throw new InstallerException(
"File Permissions Error:",
"The web server isn't allowed to write to the config file; please copy
the text below, save it as 'data/config/shimmie.conf.php', and upload it into the shimmie
folder manually. Make sure that when you save it, there is no whitespace
before the \"<?php\".
Once done, click here to Continue.",
0
);
}
}
function exit_with_page($title, $body, $code=0)
{
print("
Type:
Host:
Username:
Password:
DB Name:
Help
The username provided must have access to create tables within the database.
Shimmie Installer
$title