. '/config.php'); /* * Disable session.use_trans_sid to mitigate performance-penalty * (do it before any output is started) */ if (!defined('SID')) { @ini_set('session.use_trans_sid', 0); } ?> yCoreApi::requireOnce('modules/core/classes/GalleryTranslator.class'); list ($language) = GalleryTranslator::getSupportedLanguageCode( empty($language) ? $params['activeLanguage'] : $language); $gallery->setActiveLanguageCode($language); } $ret = $gallery->initTranslator(isset($params['noDatabase'])); if ($ret) { return $ret; } return null; } function GalleryInitSecondPass() { global $gallery; $session =& $gallery->getSession(); $urlGenerator =& $gallery->getUrlGenerator(); $ret = $urlGenerator->initNavigation(); if ($ret) { return $ret; } /* * Set our active user. Try getting our active user from registered authentication plugins. If * not, make us the anonymous user. If we don't have a session, this will initiate one for us. */ list ($ret, $pluginIds) = GalleryCoreApi::getAllFactoryImplementationIds('GalleryAuthPlugin'); if ($ret) { return $ret; } foreach ($pluginIds as $pluginId => $className) { list ($ret, $plugin) = GalleryCoreApi::newFactoryInstanceById('GalleryAuthPlugin', $pluginId); if ($ret) { return $ret; } list ($ret, $user) = $plugin->getUser(); if ($ret) { return $ret; } if (isset($user)) { break; } } if (!isset($user)) { /* Missing user, be anonymous */ list ($ret, $userId) = GalleryCoreApi::getAnonymousUserId(); if ($ret) { return $ret; } list ($ret, $user) = GalleryCoreApi::loadEntitiesById($userId, 'GalleryUser'); if ($ret) { return $ret; } } $gallery->setActiveUser($user); return null; } /** * Interceptor for the standard PHP error handler. We log any errors in the database, then * proceed with the regular error handler. * @see http://www.php.net/manual/en/function.set-error-handler.php * * @param int $errorNumber the code for the error * @param string $errorString an error message * @param string $file the file where the error occurred * @param int $line the line number of the error * @param mixed $context the complete context at the time of the error * @return boolean true if we should skip the regular PHP error handler */ function GalleryPhpErrorHandler($errorNumber, $errorString, $file, $line, $context) { if (error_reporting() == 0) { /* The @ error suppression operator was used, so don't log this error. */ return false; } $errorType = array( E_ERROR => 'Error', E_WARNING => 'Warning', E_PARSE => 'Parsing Error', E_NOTICE => 'Notice', E_CORE_ERROR => 'Core Error', E_CORE_WARNING => 'Core Warning', E_COMPILE_ERROR => 'Compile Error', E_COMPILE_WARNING => 'Compile Warning', E_USER_ERROR => 'User Error', E_USER_WARNING => 'User Warning', E_USER_NOTICE => 'User Notice', /* PHP5+: E_STRICT => 'Runtime Notice' */ /* PHP5.2+: E_RECOVERABLE_ERROR => 'Catchable Fatal Error' */ ); GalleryCoreApi::addEventLogEntry( 'PHP Error', sprintf("[%s] %s in file %s on line %d", $errorType[$errorNumber], $errorString, $file, $line), $errorString); /* Fall back to the internal error handler */ return false; } ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/lightrhy/lightrhythmvisuals.com/gallery/bootstrap.inc:53) in /home/lightrhy/lightrhythmvisuals.com/gallery/modules/core/classes/GalleryPhpVm.class on line 124

Warning: rename(/tmp/0a58e2c22c329f17afec8c6d659e6e2coKdZMH,/home/lightrhy/lightrhythmvisuals.com_gallery_g2data/sessions/0a58e2c22c329f17afec8c6d659e6e2c) [function.rename]: No such file or directory in /home/lightrhy/lightrhythmvisuals.com/gallery/modules/core/classes/GalleryPlatform.class on line 485
lts['error'] : array(); $ret = $view->renderImmediate($status, $error); if ($ret) { list ($ret2, $inGroup) = GalleryCoreApi::isUserInSiteAdminGroup(); if ($ret->getErrorCode() & ERROR_MISSING_OBJECT && ($ret2 || !$inGroup)) { /* Normalize error to GalleryView::_permissionCheck() */ $ret->addErrorCode(ERROR_PERMISSION_DENIED); } return array($ret, null); } $data['isDone'] = true; } else { if (!isset($template)) { GalleryCoreApi::requireOnce('modules/core/classes/GalleryTemplate.class'); $template = new GalleryTemplate(dirname(__FILE__)); } list ($ret, $results, $theme) = $view->doLoadTemplate($template); if ($ret) { list ($ret, $results) = $view->_permissionCheck($ret); if ($ret) { return array($ret, null); } } if (isset($results['redirect']) || isset($results['redirectUrl'])) { if (isset($results['redirectUrl'])) { $redirectUrl = $results['redirectUrl']; } else { $redirectUrl = $urlGenerator->generateUrl($results['redirect'], array('forceFullUrl' => true)); } return _GalleryMain_doRedirect($redirectUrl, $template); } if (empty($results['body'])) { return array(GalleryCoreApi::error(ERROR_BAD_PARAMETER, __FILE__, __LINE__, 'View results are missing body file'), null); } $templatePath = 'gallery:' . $results['body']; $template->setVariable('l10Domain', $theme->getL10Domain()); $template->setVariable('isEmbedded', $embedded); if ($viewName == 'core.ProgressBar') { @ini_set('output_buffering', '0'); /** * Try to prevent Apache's mod_deflate from gzipping the output since that * can interfere with streamed output. */ if (function_exists('apache_setenv') && !@$gallery->getConfig('apacheSetenvBroken')) { @apache_setenv('no-gzip', '1'); } /* Render progress bar pages immediately so that the user sees the bar moving */ $ret = $template->display($templatePath); if ($ret) { return array($ret, null); } $data['isDone'] = true; } else { $event = GalleryCoreApi::newEvent('Gallery::BeforeDisplay'); $event->setEntity($template); $event->setData(array('templatePath' => $templatePath, 'view' => $view)); list ($ret, $ignored) = GalleryCoreApi::postEvent($event); if ($ret) { return array($ret, null); } list ($ret, $html) = $template->fetch($templatePath); if ($ret) { return array($ret, null); } /* * Session: Find out whether we need to send a cookie & need a new session (only if * we don't have one yet) */ $session =& $gallery->getSession(); $ret = $session->start(); if ($ret) { return array($ret, null); } list ($ret, $shouldCache) = GalleryDataCache::shouldCache('write', 'full'); if ($ret) { return array($ret, null); } if ($embedded) { $html = $theme->splitHtml($html, $results); } if ($shouldCache && $results['cacheable']) { $htmlForCache = $html; if ($embedded) { $themeDataForCache = $template->getVariable('theme'); } } if ($embedded) { $data = $session->replaceSessionIdInData($html); $data['themeData'] =& $template->getVariableByReference('theme'); $data['themeData'] = $session->replaceSessionIdInData($data['themeData']); $data['isDone'] = false; } else { /* Set the appropriate charset in our HTTP header */ if (!headers_sent()) { header('Content-Type: text/html; charset=UTF-8'); } print $session->replaceTempSessionIdIfNecessary($html); $data['isDone'] = true; } if ($shouldCache && $results['cacheable']) { $session =& $gallery->getSession(); $cacheKey = $urlGenerator->getCacheableUrl(); $sessionId = $session->getId(); if (!empty($sessionId) && $sessionId != SESSION_TEMP_ID) { $htmlForCache = $session->replaceSessionIdInData( $htmlForCache, $sessionId, SESSION_TEMP_ID); if ($embedded) { $data['themeData'] = $session->replaceSessionIdInData( $data['themeData'], $sessionId, SESSION_TEMP_ID); } } if ($embedded) { $htmlForCache = serialize($htmlForCache); $ret = GalleryDataCache::putPageData('theme', $results['cacheable'], $cacheKey, serialize($data['themeData'])); if ($ret) { return array($ret, null); } } $ret = GalleryDataCache::putPageData('page', $results['cacheable'], $cacheKey, $htmlForCache); if ($ret) { return array($ret, null); } } } } } return array(null, $data); } function _GalleryMain_doRedirect($redirectUrl, $template=null, $controller=null, $ignoreErrors=false) { global $gallery; $session =& $gallery->getSession(); $urlGenerator =& $gallery->getUrlGenerator(); /* Create a valid sessionId for guests, if required */ $ret = $session->start(); if ($ret) { if ($ignoreErrors) { $gallery->debug("_GalleryMain_doRedirect: Failed to start the session, error stack:\n" . $ret->getAsHtml); } else { return array($ret, null); } } $redirectUrl = $session->replaceTempSessionIdIfNecessary($redirectUrl); $session->doNotUseTempId(); /* * UserLogin returnUrls don't have a sessionId in the URL to replace, make sure there's a * sessionId in the redirectUrl for users that don't use cookies */ if (!$session->isUsingCookies() && $session->isPersistent() && strpos($redirectUrl, $session->getKey()) === false) { $redirectUrl = GalleryUrlGenerator::appendParamsToUrl($redirectUrl, array($session->getKey() => $session->getId())); } if ($gallery->getDebug() == false || $gallery->getDebug() == 'logged') { /* * The URL generator makes HTML 4.01 compliant URLs using & but we don't want those in * our Location: header */ $redirectUrl = str_replace('&', '&', $redirectUrl); $redirectUrl = rtrim($redirectUrl, '&? '); $redirectUrl = $urlGenerator->makeAbsoluteUrl($redirectUrl); /* * IIS 3.0 - 5.0 webservers will ignore all other headers if the location header is set. It * will simply not send other headers, eg. the set-cookie header, which is important for us * in the login and logout requests / redirects. See: * http://support.microsoft.com/kb/q176113/ Our solution: detect IIS version and append * GALLERYSID to the Location URL if necessary */ if (in_array($controller, array('core.Logout', 'core.UserLogin', 'publishxp.Login'))) { /* Check if it's IIS and if the version is < 6.0 */ $webserver = GalleryUtilities::getServerVar('SERVER_SOFTWARE'); if (!empty($webserver) && preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($webserver), $matches) && $matches[1] < 6) { /* * It is IIS and it's a version with this bug, check if GALLERYSID is already in the * URL, else append it */ $session =& $gallery->getSession(); $sessionParamString = GalleryUtilities::prefixFormVariable(urlencode($session->getKey())) . '=' . urlencode($session->getId()); if ($session->isPersistent() && !strstr($redirectUrl, $sessionParamString)) { $redirectUrl .= (strpos($redirectUrl, '?') === false) ? '?' : '&'; $redirectUrl .= $sessionParamString; } } } GalleryUtilities::setResponseHeader("Location: $redirectUrl"); return array(null, array('isDone' => true)); } return array(null, array('isDone' => true, 'redirectUrl' => $redirectUrl, 'template' => $template)); } /** * Handle an error condition that happened somewhere in our main request processing code. If the * error cannot be handled, then add an error in the event log. * @param GalleryStatus a status code * @param array $g2Data the results from _GalleryMain */ function _GalleryMain_errorHandler($error, $g2Data=null) { global $gallery; GalleryCoreApi::requireOnce('modules/core/ErrorPage.inc'); $handledError = ErrorPageView::errorHandler($error, $g2Data); if (!$handledError) { $summary = $error->getErrorMessage(); if (empty($summary)) { $summary = join(', ', $error->getErrorCodeConstants($error->getErrorCode())); } GalleryCoreApi::addEventLogEntry('Gallery Error', $summary, $error->getAsText()); } } ?>