Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: error message

  1. #1
    New to the CF scene
    Join Date
    Jul 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    error message

    hi id like if someone could help me with the following error message


    ERRNO: 2
    TEXT: main(c:\wamp\www\passport/libs/smarty/Smarty.class.php) [function.main]: failed to open stream: No such file or directory
    LOCATION: c:\wamp\www\passport\include\setup_smarty.php, line 3, at September 2, 2006, 8:26 pm
    Showing backtrace:
    require_once("c:\wamp\www\passport\include\setup_smarty.php") # line 3, file: c:\wamp\www\passport\include\setup_smarty.php
    require_once("c:\wamp\www\passport\include\setup_smarty.php") # line 6, file: c:\wamp\www\passport\include\app_top.php
    require_once("c:\wamp\www\passport\include\app_top.php") # line 3, file: c:\wamp\www\passport\tmp5al404zcoa.php

    here is the associated files
    if anyone could help i would be grateful. i have a good knowledge of programming languages. But not a programmer and become stuck with error messages in php. If anyone could offer me any advice i am trying to set up my own ecommerce site and have only started many thanks

    im working with php apache smarty and pear db
    i have the following files in a folder called include
    app_top.php
    <?php
    // include utility files
    require_once 'config.inc.php';
    require_once 'tss_error_handler.php';
    require_once 'setup_smarty.php';
    ?>
    setup_smarty.php
    <?php
    // Reference Smarty library
    require_once SMARTY_DIR.'Smarty.class.php';
    // Reference our configuration file
    require_once 'config.inc.php';
    // Class that extends Smarty, used to process and display Smarty files
    class Page extends Smarty
    {
    // constructor
    function __construct()
    {
    // Call Smarty's constructor
    $this->Smarty();
    // Change the default template directories
    $this->template_dir = TEMPLATE_DIR;
    $this->compile_dir = COMPILE_DIR;
    $this->config_dir = CONFIG_DIR;
    }
    }
    ?>


    config.inc.php
    <?php
    // SITE_ROOT contains the full path to the tshirtshop folder
    define("SITE_ROOT", dirname(dirname(__FILE__)));
    // Settings needed to configure the Smarty template engine
    define("SMARTY_DIR", SITE_ROOT."/libs/smarty/");
    define("TEMPLATE_DIR", SITE_ROOT."/templates");
    define("COMPILE_DIR", SITE_ROOT."/templates_c");
    define("CONFIG_DIR", SITE_ROOT."/configs");
    // these should be true while developing the web site
    define("IS_WARNING_FATAL", true);
    define("DEBUGGING", true);
    // settings about mailing the error messages to admin
    define("SEND_ERROR_MAIL", false);
    define("ADMIN_ERROR_MAIL", "admin_mail@localhost");
    define("SENDMAIL_FROM", "errors@tshirtshop.com");
    ini_set("sendmail_from", SENDMAIL_FROM);
    // by default we don't log errors to a file
    define("LOG_ERRORS", false);
    define("LOG_ERRORS_FILE", "c:\\tshirtshop\\errors_log.txt"); // Windows
    // define("LOG_ERRORS_FILE", "/var/tmp/tshirtshop_errors.log"); // Unix
    // Generic error message to be diplayed instead of debug info
    // (when DEBUGGING is false)
    define("SITE_GENERIC_ERROR_MESSAGE", "<h2>TShirtShop Error!</h2>");

    ?>
    tss_error_handler.php
    <?php
    // set the user error handler method to be tss_error_handler
    set_error_handler("tss_error_handler", E_ALL);
    // error handler function
    function tss_error_handler($errNo, $errStr, $errFile, $errLine)
    {
    /* the first two elements of the backtrace array are irrelevant:
    -DBG_Backtrace
    -outErrorHandler */
    $backtrace = dbg_get_backtrace(2);
    // error message to be displayed, logged or mailed
    $error_message = "\nERRNO: $errNo \nTEXT: " . $errStr . " \n" .
    "LOCATION: " . $errFile . ", line " . $errLine . ", at " .
    date("F j, Y, g:i a") . "\nShowing backtrace:\n" .
    $backtrace . "\n\n";
    // email the error details, in case SEND_ERROR_MAIL is true
    if (SEND_ERROR_MAIL == true)
    error_log($error_message, 1, ADMIN_ERROR_MAIL, "From: " .
    SENDMAIL_FROM . "\r\nTo: " . ADMIN_ERROR_MAIL);
    // log the error, in case LOG_ERRORS is true
    if (LOG_ERRORS == true)
    error_log($error_message, 3, LOG_ERRORS_FILE);
    // warnings don't abort execution if IS_WARNING_FATAL is false
    // E_NOTICE and E_USER_NOTICE errors don't abort execution
    if (($errNo == E_WARNING && IS_WARNING_FATAL == false) ||
    ($errNo == E_NOTICE || $errNo == E_USER_NOTICE))
    // if the error is non-fatal ...
    {
    // show message only if DEBUGGING is true
    if (DEBUGGING == true)
    echo "<pre>" . $error_message . "</pre>";
    }
    else
    // if error is fatal ...
    {
    // show error message
    if (DEBUGGING == true)
    echo "<pre>" . $error_message . "</pre>";
    else
    echo SITE_GENERIC_ERROR_MESSAGE;
    // stop processing the request
    exit;
    }
    }
    // builds backtrace message
    function dbg_get_backtrace($irrelevantFirstEntries)
    {
    $s = '';
    $MAXSTRLEN = 64;
    $traceArr = debug_backtrace();
    for ($i = 0; $i < $irrelevantFirstEntries; $i++)
    array_shift($traceArr);
    $tabs = sizeof($traceArr) - 1;
    foreach($traceArr as $arr)
    {
    $tabs -= 1;
    if (isset($arr['class']))
    $s .= $arr['class'] . '.';
    $args = array();
    if (!empty($arr['args']))
    foreach($arr['args']as $v)
    {
    if (is_null($v))
    $args[] = 'null';
    else if (is_array($v))
    $args[] = 'Array[' . sizeof($v).']';
    else if (is_object($v))
    $args[] = 'Object:' . get_class($v);
    else if (is_bool($v))
    $args[] = $v ? 'true' : 'false';
    else
    {
    $v = (string)@$v;
    $str = htmlspecialchars(substr($v, 0, $MAXSTRLEN));
    if (strlen($v) > $MAXSTRLEN)
    $str .= '...';
    $args[] = "\"" . $str . "\"";
    }
    }
    $s .= $arr['function'] . '(' . implode(', ', $args) . ')';
    $Line = (isset($arr['line']) ? $arr['line']: "unknown");
    $File = (isset($arr['file']) ? $arr['file']: "unknown");
    $s .= sprintf(" # line %4d, file: %s", $Line, $File, $File);
    $s .= "\n";
    }
    return $s;
    }
    ?>

  • #2
    Regular Coder
    Join Date
    Aug 2006
    Location
    UK, London, Dartford
    Posts
    221
    Thanks
    3
    Thanked 14 Times in 14 Posts
    It's saying it carn't find the directory, makes sur eit's there and named right.....

  • #3
    Regular Coder googleit's Avatar
    Join Date
    Jul 2006
    Location
    birmingham, uk
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts
    did you read this thread? Please wrap PHP codes using the [PHP][/PHP] tag
    it would be easyer to read you code


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •