+ Reply to Thread
Results 1 to 2 of 2

Thread: Smarty( Fatal error: require() [function.require] )

  1. #1
    AsianX is offline x10Hosting Member AsianX is an unknown quantity at this point
    Join Date
    Aug 2008
    Posts
    10

    Question Smarty( Fatal error: require() [function.require] )

    2 errors I know of, not saying there isnt more..

    I believe this to be an issue with the chat files, its the only place I see errors and the chat is recently added( not working as of yet ).
    First error shows in the frame where the chat is supposed to display. "fpchat" is the directory the chat files are in. I dont see a file listed after that its referring to.

    Fatal error: require() [function.require]: Failed opening required './include/smarty/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/XXX/public_html/fpchat') in /home/XXX/public_html/include/smarty/smarty_config.php on line 13

    the smarty config file is:
    Code:
    <?php 
    if($folder == "base") { 
    $serverpath = "."; 
    } else { 
    $serverpath = ".."; 
    } 
    // SPECIFY PATHS TO SMARTY RESOURCES 
    $smartypath_template_dir = realpath("$serverpath/templates"); 
    $smartypath_compile_dir = realpath("$serverpath/include/smarty/templates_c"); 
    $smartypath_cache_dir = realpath("$serverpath/include/smarty/cache"); 
    $smartypath_config_dir = realpath("$serverpath/include/smarty/configs"); 
    // INITIATE SMARTY CLASS 
    require("$serverpath/include/smarty/Smarty.class.php"); 
    $smarty = new Smarty(); 
    // ASSIGN SMARTY TEMPLATE DIRECTORY PATHS 
    $smarty->template_dir = $smartypath_template_dir; 
    $smarty->compile_dir = $smartypath_compile_dir; 
    $smarty->cache_dir = $smartypath_cache_dir; 
    $smarty->config_dir = $smartypath_config_dir; 
    ?>
    obviously an issue with the path ( no idea where to begin )

    on debug of the chat tpl .. this errror was displayed.

    Code:
    assigned template variables{$database}     Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 21749 bytes) in /home/XXX/public_html/include/smarty/plugins/modifier.debug_print_var.php on line 36
    Any information you may need that I forgot to list, please ask. Ive been trying to get a working chat(this is userplane btw) for well over 2 months, on n off. Frustrating to say the least. Any help would be appreciated.
    Thanks

  2. #2
    mfurqanabid's Avatar
    mfurqanabid is offline x10Hosting Member mfurqanabid is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    37

    Re: Smarty( Fatal error: require() [function.require] )

    Use this


    <?php
    $serverpath =$_SERVER["DOCUMENT_ROOT"] . "/";
    // INITIATE SMARTY CLASS
    require($serverpath . "include/smarty/Smarty.class.php");
    $smarty = new Smarty();
    // ASSIGN SMARTY TEMPLATE DIRECTORY PATHS
    $smarty->template_dir = $serverpath . "templates";
    $smarty->compile_dir = $serverpath . "templates_c";
    $smarty->cache_dir = $serverpath . "cache";
    $smarty->config_dir =$serverpath . "config";
    ?>

    Or View it online here http://www.smarty.net/manual/en/inst...arty.basic.php
    Muhammad Furqan

    Visit knowledge Hut for programming help.

+ Reply to Thread

Similar Threads

  1. [TUTORIAL] Introducción a Smarty
    By eZakto in forum Tutoriales
    Replies: 3
    Last Post: 06-13-2010, 04:25 AM
  2. Smarty Installation
    By jaybe in forum Free Hosting
    Replies: 3
    Last Post: 07-10-2008, 05:18 PM
  3. Replies: 6
    Last Post: 10-18-2007, 06:07 AM
  4. Fatal Error: SUHOSIN
    By shivk in forum Free Hosting
    Replies: 5
    Last Post: 09-26-2007, 08:55 PM
  5. Smarty Template System
    By lambada in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 12-22-2006, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers