+ Reply to Thread
Results 1 to 4 of 4

Thread: Urgent Problem!! please help

  1. #1
    amplec's Avatar
    amplec is offline x10Hosting Member amplec is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    9

    Unhappy Urgent Problem!! please help

    My site is showing: Warning: shell_exec() has been disabled for security reasons in /home/kamal/public_html/lib/lib_functions.php on line 12
    1046: No database selected

    My database details:
    DEFINE('DB_DETAILS', true);
    DEFINE('DB_HOST', "localhost");
    DEFINE('DB_USER', "kamal_admin");
    DEFINE('DB_PASS', "*****");
    DEFINE('DB_NAME', "kamal_kamal");



    The functions.php is as bellows. Can anyone please fix this.

    PHP Code:
    <?

    /*
    GEN2 PTC SCRIPT, A copyrighted trademark of PTCPay.com 2007-2008. DISTRIBUTED UNDER GNU GENERAL PUBLIC LICENSE.

     "Gen2PTC", "PTCPay" are a copyrighted service of PTCPay.com. All other respective trademarks remain a respectable licensed product of it's original creator.

     This file is a partial script from the Gen2PTC webscript which is open source and distributed through GNU PUBLIC LICENSE; This software remains copyrighted and any sign of unauthorised abuse will result in PTCPay taking action.

    http://www.ptcpay.com/
    */

      
    session_start ();

      if (!
    $stop_eval)
      {

        global 
    $c;
        if(
    is_dir('install/'))
        {
        
    header("Location: install/");
        }

        

        if(
    defined('DB_DETAILS') && $c && !$error_log) {

        if(!
    $_SESSION['setting'])
        {
    $setq mysql_query("SELECT * FROM settings");
    // false is returned if something goes wront, not a result resource
    if (!$setq) {
        echo 
    mysql_errno() . ': ' mysql_error();
        exit;
    }

    while(
    $r=mysql_fetch_array($setq))
        {
        
    $set[$r[set_name]] = $r['set_value'];
        
    $_SESSION['setting'][$r[set_name]] = $r['set_value'];
        }
        } else {
        
    $set $_SESSION['setting'];
        }

        if(!
    is_array($set))
        {
         die(
    "An error occured while trying to process the settings, Please re-

        access the site later or consult the administrator."
    );
        }


        
    DEFINE('GEN2_PROCESS'true);

        if(
    $set['theme_active'])
        {
        
    DEFINE('THDIR''themes/'.$set['theme_active'].'/');
        
    DEFINE('HEADER''themes/'.$set['theme_active'].'/t.php');
        
    DEFINE('FOOTER''themes/'.$set['theme_active'].'/f.php');
        } else {
        
    DEFINE('THDIR''themes/default/');
        
    DEFINE('HEADER''themes/default/t.php');
        
    DEFINE('FOOTER''themes/default/f.php');
        }

        
    $signin_username $_SESSION['account_username'];
        
    $signin_password $_SESSION['account_password'];
        
    $signin_token $_SESSION['account_token'];

        
    $admin_username $_SESSION['admin_username'];
        
    $admin_password $_SESSION['admin_password'];
        
    $admin_token $_SESSION['admin_token'];


        if(
    $admin_username && $admin_password && $admin_token == 

        
    session_id())
        {
        
    $admin_loggedin 1;
        
    $aq mysql_query("SELECT * FROM admins WHERE 

        aUsername='
    {$admin_username}' AND aPassword='{$admin_password}

        LIMIT 1;"
    );
        
    $ar mysql_fetch_array($aq);
        }

        if(
    $signin_username && $signin_password && $signin_token == 

        
    session_id())
        {
        
    $loggedin 1;
        if(
    $_SESSION['me'])
        {
        
    $ir=$_SESSION['me'];
        } else {
        
    $iqcn mysql_query("SELECT COUNT(*) AS cnt FROM users WHERE 

        username='
    {$signin_username}' AND password='{$signin_password}

        AND suspended='0' LIMIT 1;"
    );
        
    $iqcn mysql_fetch_array($iqcn);
        
    $iqcn $iqcn['cnt'];
        if(!
    $iqcn) { $do->logout(); } else {
        
    $iq mysql_query("SELECT * FROM users WHERE 

        username='
    {$signin_username}' AND password='{$signin_password}

        AND suspended='0' LIMIT 1;"
    );
        
    $ir mysql_fetch_array($iq);
        
    $_SESSION['me'] = $ir;
        }
        }
        }

        } else {
        die(
    "The configuration did not recieve appropriate variables to accept 

        your request."
    );
        }

        if (
    $set['next_clearup'] < time ())
        {
          
    $next_clearup time () + 60 60 24;
          
    mysql_query ('' 'UPDATE settings SET set_value=\'' $next_clearup '\' WHERE set_name=\'next_clearup\' LIMIT 1;');
          
    mysql_query ('UPDATE users SET ads_clicked=\'\' WHERE ads_clicked!=\'\'');
        }
      }

    ?>
    Last edited by amplec; 01-24-2010 at 11:25 AM.

  2. #2
    Zubair's Avatar
    Zubair is offline x10 Super Spammer Zubair has a reputation beyond reputeZubair has a reputation beyond reputeZubair has a reputation beyond repute
    Join Date
    Jul 2009
    Location
    Pakistan
    Posts
    8,747

    Re: Urgent Problem!! please help

    exec() and shell_exec() function are disabled on free servers for security reasons.

    This will not work on free account. To use this upgrade to paid hosting.
    Last edited by Zubair; 01-24-2010 at 11:26 AM.
    Zubair Barkat | Level 2 Tech
    █ 888-X10-9668 - zubair[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004

  3. #3
    xgreenberetx is offline x10Hosting Member xgreenberetx is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    57

    Re: Urgent Problem!! please help

    Make sure the table settings exist in the database you connected to.

  4. #4
    slacker3 is offline x10 Sophmore slacker3 is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    146

    Re: Urgent Problem!! please help

    this is just an warning
    Warning: shell_exec() has been disabled for security reasons in /home/kamal/public_html/lib/lib_functions.php on line 12
    is this your error?
    1046: No database selected

    Also, you shouldn't give away too much of your login details..

+ Reply to Thread

Similar Threads

  1. DB number problem
    By lionheart8 in forum Free Hosting
    Replies: 5
    Last Post: 04-08-2008, 08:26 AM
  2. Site Problem
    By himgar in forum Free Hosting
    Replies: 3
    Last Post: 03-10-2008, 03:36 PM
  3. Problem uploading image (GD library problem)
    By HyDr@ in forum Free Hosting
    Replies: 1
    Last Post: 12-01-2006, 04:27 PM
  4. Ad code problem!
    By Akkarin in forum Free Hosting
    Replies: 8
    Last Post: 08-29-2005, 10:39 AM

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