= G2_SUPPORT_MAX_LOGIN_ATTEMPTS) { if (!file_exists($authFile)) { $options['authFileErrors']['missing'] = 1; } else if (!is_readable($authFile)) { $options['authFileErrors']['unreadable'] = 1; } else { $authKeyFromFile = trim(join('', file($authFile))); if ($authKeyFromFile == $options['key']) { GallerySetupUtilities::authenticateThisSession(); GallerySetupUtilities::redirectBackToSelf(); exit; } else { $options['authFileErrors']['mismatch'] = 1; } } render('loginTxtForm', $options); } else if (!empty($_POST['password'])) { if ($_POST['password'] == $config['setup.password']) { GallerySetupUtilities::authenticateThisSession(); GallerySetupUtilities::redirectBackToSelf(); exit; } else { $options['attempts']++; if (!GallerySetupUtilities::setLoginAttempts($options['attempts'])) { $options['error'] = true; } if ($options['error'] || $options['attempts'] >= G2_SUPPORT_MAX_LOGIN_ATTEMPTS) { if ($options['attempts'] >= G2_SUPPORT_MAX_LOGIN_ATTEMPTS) { $ret = GallerySetupUtilities::notifySiteAdministrator(); /* swallow return code; we can't do anything with it */ } render('loginTxtForm', $options); } else { $options['wrongPassword'] = 1; render('passwordForm', $options); } } } else { if (isset($_POST['password'])) { $options['missingPassword'] = 1; } render('passwordForm', $options); } } if (GallerySetupUtilities::isSessionAuthenticated()) { /* This is the only safe way out of this include. Everything else aborts now */ return; } /* Unless we're properly authenticated, this is the end of the line */ exit; function startForm($action='', $name=null) { print '
'; if (!GallerySetupUtilities::areCookiesSupported()) { print ''; } } function render($renderType, $options=array()) { global $baseUrl; ?> Security Check
Security Check

You are attempting to access a secure section of this Gallery installation. You can't proceed until you pass the security check.

You must create a config.php file in the Gallery directory before you can continue configuring the application. Use the installer to create one.
You must enter a setup password in your gallery/config.php file in order to be able to set up Gallery. If your config.php is empty, you should run the installer to install your Gallery.
Failed login attempts: out of a total of .

In order to verify you, we require you to enter your Gallery setup password. This is the password you entered when you installed Gallery. It can be found in your gallery/config.php file like this:

           $gallery->setConfig('setup.password', 'your password here');
         

Password:

Please enter a password!

There was a problem connecting to the database. You have exceeded the maximum attempts to login by entering a password. To prevent somebody from hacking your website, we now require you to complete a stricter authentication process. You must create a text file called login.txt in the gallery2 directory on your webserver (that's the same directory where main.php is located) and put specific text in it. If you used the preinstaller to install Gallery, then you may have to use it again to set your directory permissions so that you can create the login.txt file.

Create this file: login.txt
Put this in the file:
The login.txt file does not exist. The login.txt file exists, but is not readable by the webserver.
Try: chmod 644 login.txt The password in your login.txt file does not match the key above!