hi i coded a software that was working fine last week. but i noticed that none of it's php fines is working. the pages are not loading. see this url for example i was confused and thought maybe the php softwares on the server are not running properly, so tested a php file: working.php: <?php echo "php is working"; ?> and you see it's working: click here to see this software also uses pear and mysql codes can you guess any reason?
in almost all of the pages that are not loaded (but were loading already) (like http://textly.fr/login.php ) this code is used on the top: include 'global.php'; and global.php is: <?php /* $Id: global.php,v 1.65 2002/09/20 08:57:24 shaggy Exp $ */ session_start(); // keep above lib/user.php and functions.php require_once 'functions.php'; require_once '../config.php'; // before session_defaults require_once 'session_defaults.php'; require_once 'lib/user.php'; include 'error.php'; $db = db_connect(); $user = new User($db); ?> PHP:
and config.php is: <?php function handlePearError($error) { header('HTTP/1.0 500 Internal Server Error'); //die("$error->message<br />$error->userinfo"); // uncomment this to debug die('Error ocurred, please try again later'); } function &db_connect() { require_once 'DB.php'; $dsn = "mysql://root:@unix+localhost/adsense"; $db = DB::connect($dsn); if (DB::isError($db)) { die("Database connection failed."); } $db->setFetchMode(DB_FETCHMODE_OBJECT); $db->setErrorHandling(PEAR_ERROR_CALLBACK, 'handlePearError'); return $db; } ?> PHP: