* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /** * * @author Andrei Vassilenko <*****@*****.**> */ require_once realpath(dirname(__FILE__) . '/../') . '/vendors/Av/FrameworkFile.php'; require_once Av\FrameworkFile::getVendorsPath(false) . '/Av/Autoloader.php'; // it is __autoload for utils, service classes spl_autoload_register(function ($class) { Av\AutoLoader::setRequireFile($class); }); ini_set('include_path', Av\FrameworkFile::getIncludeCorePaths()); ini_set('session.name', 'ASESSIONS'); // session cookie name ini_set('session.gc_maxlifetime', 43200); // 43200 = 12 hours; # of seconds before garbage collection considers a session as abandoned ini_set('session.cookie_httponly', true); // boolean ; Marks the cookie as accessible only through the HTTP protocol. ini_set('session.session.cookie_secure', false); // boolean ; Specifies whether cookies should only be sent over secure connections // this is needed for PHP 5.3 // It just basically loads up a default time setting for all date() calls. date_default_timezone_set('America/Los_Angeles'); define('DBHOST', '127.0.0.1'); // dev define('DBPORT', '3306'); define('DBUSER', 'root');
<?php if (!defined('APPLICATION_DEBUG')) { define('APPLICATION_DEBUG', true); } if (APPLICATION_DEBUG) { error_reporting(-1); ini_set('display_errors', 'On'); } else { ob_end_clean(); ob_start(); error_reporting(0); // we will do our own error reporting register_shutdown_function('check_for_messages'); } require_once realpath(dirname(__FILE__)) . '/vendors/Av/FrameworkFile.php'; require_once Av\FrameworkFile::getCoreConfigPath() . "config.php"; require_once Av\FrameworkFile::getCoreConfigPath() . "common.php"; function check_for_messages() { $output_buffer = ob_get_contents(); ob_end_clean(); if (!empty($output_buffer)) { // better send e-mail to admin print_r("Other Output information:<br><pre>" . $output_buffer . "</pre><br>"); } }