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 5 of 5
  1. #1
    Banned
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts

    need help PLEASE READ

    I keep Getting This Error on my site but i dont know what it means


    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/lib/php/./templates/tmpl1//./templates/tmpl1/index.tpl.html) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/a2438169/public_html/cynscriptz/buy/smarty/core/core.get_include_path.php on line 34

    my website is http://cynscriptz.com/

    which is masking my real website name

    http://mytestsite.net76.net/cynscriptz/buy/index.php

    Any help appreciated

    -------------------------------------------------------
    This is the line that has the error


    Code:
    if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
    this is the File That has the error
    Code:
    <?php
    /**
     * Smarty plugin
     * @package Smarty
     * @subpackage plugins
     */
    
    /**
     * Get path to file from include_path
     *
     * @param string $file_path
     * @param string $new_file_path
     * @return boolean
     * @staticvar array|null
     */
    
    //  $file_path, &$new_file_path
    
    function smarty_core_get_include_path(&$params, &$smarty)
    {
        static $_path_array = null;
    
        if(!isset($_path_array)) {
            $_ini_include_path = ini_get('include_path');
    
            if(strstr($_ini_include_path,';')) {
                // windows pathnames
                $_path_array = explode(';',$_ini_include_path);
            } else {
                $_path_array = explode(':',$_ini_include_path);
            }
        }
        foreach ($_path_array as $_include_path) {
            if (file_exists($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
                   $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
                return true;
            }
        }
        return false;
    }
    
    /* vim: set expandtab: */
    
    ?>

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    - read rule 2 from Posting Guidelines
    - read open_dirbase from this link:
    http://www.php.net/manual/en/features.safe-mode.php

    regards

  • #3
    Banned
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts
    sorry for the messed up subject -------------------
    --------------------------------------------------

    How do i fix it im not good with php? i dont understand what im supposed to do with safemode command could you fix the piece of code and post it so it will work correctly?

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by I_Love_Privacy View Post
    sorry for the messed up subject -------------------
    --------------------------------------------------

    How do i fix it im not good with php? i dont understand what im supposed to do with safemode command could you fix the piece of code and post it so it will work correctly?
    the problem with subject is that people don't answer to something so general, that's all,

    about error, I don't use smarty and I have no idea how could be fixed, probably something in setup, that's whay I post only the link, maybe could help you.

    from manual:
    Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.
    is not about safe mode, is about the rest of the description of open_dirbase.(Don't ask me why is open_basedir there? )
    I guess that you must check the value of open_dirbase, DIRECTORY_SEPARATOR, function parameters, anything related with this function( I talk about smarty_core ....), using echo or print/print_r for arrays, and change smarty setup to fix it.

    sorry, but that's all I can do to help.

    regards
    Last edited by oesxyl; 08-02-2008 at 10:04 PM.

  • #5
    Banned
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    6
    Thanked 0 Times in 0 Posts
    ok thanks


  •  

    Posting Permissions

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