The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User:xxxx PID:31508 Run Time:10(secs) Memory:93900(kb) exe:/usr/bin/php cmd:/usr/

Discussion in 'Workarounds and Optimization' started by Slatko, Jan 28, 2011.

  1. Slatko

    Slatko Member

    Joined:
    Jan 21, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Hello i get messages from my Cpanel/WHM:
    Code:
    User:xxx PID:307 Run Time:2(secs) Memory:81116(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:310 Run Time:2(secs) Memory:81116(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:330 Run Time:1(secs) Memory:77720(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:334 Run Time:1(secs) Memory:81116(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:336 Run Time:0(secs) Memory:81116(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:341 Run Time:0(secs) Memory:93900(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:344 Run Time:0(secs) Memory:81636(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:347 Run Time:0(secs) Memory:82976(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:349 Run Time:0(secs) Memory:81636(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:31437 Run Time:16(secs) Memory:85072(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:31495 Run Time:11(secs) Memory:81644(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    User:xxx PID:31508 Run Time:10(secs) Memory:93900(kb) exe:/usr/bin/php cmd:/usr/bin/php /home/xxx/public_html/misc.php
    
    This User use Vbulletin, the file misc.php looks ok i think:
    Code:
    <?php
    /*======================================================================*\
    || #################################################################### ||
    || # vBulletin 4.0.5
    || # ---------------------------------------------------------------- # ||
    || # Copyright ©2000-2010 vBulletin Solutions Inc. All Rights Reserved. ||
    || # This file may not be redistributed in whole or significant part. # ||
    || # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
    || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
    || #################################################################### ||
    \*======================================================================*/
    
    // ####################### SET PHP ENVIRONMENT ###########################
    error_reporting(E_ALL & ~E_NOTICE);
    
    // #################### DEFINE IMPORTANT CONSTANTS #######################
    define('THIS_SCRIPT', 'misc');
    define('CSRF_PROTECTION', true);
    if (in_array($_GET['do'], array('whoposted', 'buddylist', 'getsmilies')))
    {
    	define('NOPMPOPUP', 1);
    }
    
    // ################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array('fronthelp', 'register');
    
    // get special data templates from the datastore
    $specialtemplates = array();
    
    // pre-cache templates used by all actions
    $globaltemplates = array();
    
    // pre-cache templates used by specific actions
    $actiontemplates = array(
    	'buddylist' => array(
    		'BUDDYLIST',
    		'buddylistbit'
    	),
    	'whoposted' => array(
    		'WHOPOSTED',
    		'whopostedbit'
    	),
    	'showattachments' => array(
    		'ATTACHMENTS',
    		'attachmentbit',
    	),
    	'bbcode' => array(
    		'help_bbcodes',
    		'help_bbcodes_bbcode',
    		'help_bbcodes_link',
    		'bbcode_code',
    		'bbcode_html',
    		'bbcode_php',
    		'bbcode_quote',
    		'bbcode_video',
    	),
    	'getsmilies' => array(
    		'smiliepopup',
    		'smiliepopup_category',
    		'smiliepopup_row',
    		'smiliepopup_smilie',
    		'smiliepopup_straggler'
    	),
    	'showsmilies' => array(
    		'help_smilies',
    		'help_smilies_smilie',
    		'help_smilies_category',
    	),
    	'showrules' => array(
    		'help_rules',
    	)
    );
    $actiontemplates['none'] =& $actiontemplates['showsmilies'];
    
    // allows proper template caching for the default action (showsmilies) if no valid action is specified
    if (!empty($_REQUEST['do']) AND !isset($actiontemplates["$_REQUEST[do]"]))
    {
    	$actiontemplates["$_REQUEST[do]"] =& $actiontemplates['showsmilies'];
    }
    
    // ######################### REQUIRE BACK-END ############################
    require_once('./global.php');
    
    // #######################################################################
    // ######################## START MAIN SCRIPT ############################
    // #######################################################################
    
    ($hook = vBulletinHook::fetch_hook('misc_start')) ? eval($hook) : false;
    
    // ############################### start buddylist ###############################
    if ($_REQUEST['do'] == 'buddylist')
    {
    	if (!$vbulletin->userinfo['userid'])
    	{
    		print_no_permission();
    	}
    
    	($hook = vBulletinHook::fetch_hook('misc_buddylist_start')) ? eval($hook) : false;
    
    	$buddies =& $vbulletin->input->clean_gpc('r', 'buddies', TYPE_STR);
    
    	$datecut = TIMENOW - $vbulletin->options['cookietimeout'];
    
    	$buddys = $db->query_read_slave("
    		SELECT
    		user.username, (user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.userid, session.lastactivity
    		FROM " . TABLE_PREFIX . "userlist AS userlist
    		LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = userlist.relationid)
    		LEFT JOIN " . TABLE_PREFIX . "session AS session ON(session.userid = user.userid)
    		WHERE userlist.userid = {$vbulletin->userinfo['userid']} AND userlist.relationid = user.userid AND type = 'buddy'
    		ORDER BY username ASC, session.lastactivity DESC
    	");
    
    	$onlineusers = '';
    	$offlineusers = '';
    	$newusersound = '';
    	$lastonline = array();
    
    	if (isset($buddies))
    	{
    		$buddies = urldecode($buddies);
    		$lastonline = explode(' ', $buddies);
    	}
    	$buddies = '0 ';
    	$show['playsound'] = false;
    
    	require_once(DIR . '/includes/functions_bigthree.php');
    	while ($buddy = $db->fetch_array($buddys))
    	{
    		if ($doneuser["$buddy[userid]"])
    		{
    			continue;
    		}
    
    		$doneuser["$buddy[userid]"] = true;
    
    		if ($onlineresult = fetch_online_status($buddy))
    		{
    			if ($onlineresult == 1)
    			{
    				$buddy['statusicon'] = 'online';
    			}
    			else
    			{
    				$buddy['statusicon'] = 'invisible';
    			}
    			$buddies .= $buddy['userid'] . ' ';
    		}
    		else
    		{
    			$buddy['statusicon'] = 'offline';
    		}
    
    		$show['highlightuser'] = false;
    
    		($hook = vBulletinHook::fetch_hook('misc_buddylist_bit')) ? eval($hook) : false;
    
    		if ($buddy['statusicon'] != 'offline')
    		{
    			if (!in_array($buddy['userid'], $lastonline) AND !empty($lastonline))
    			{
    				$show['playsound'] = true;
    				$show['highlightuser'] = true;
    				// add name to top of list
    				$templater = vB_Template::create('buddylistbit');
    					$templater->register('buddy', $buddy);
    				$onlineusers = $templater->render() . $onlineusers;
    			}
    			else
    			{
    				$templater = vB_Template::create('buddylistbit');
    					$templater->register('buddy', $buddy);
    				$onlineusers .= $templater->render();
    			}
    		}
    		else
    		{
    			$templater = vB_Template::create('buddylistbit');
    				$templater->register('buddy', $buddy);
    			$offlineusers .= $templater->render();
    		}
    	}
    
    	$buddies = urlencode(trim($buddies));
    
    	($hook = vBulletinHook::fetch_hook('misc_buddylist_complete')) ? eval($hook) : false;
    
    	$templater = vB_Template::create('BUDDYLIST');
    		$templater->register_page_templates();
    		$templater->register('buddies', $buddies);
    		$templater->register('offlineusers', $offlineusers);
    		$templater->register('onlineusers', $onlineusers);
    	print_output($templater->render());
    }
    
    // ############################### start who posted ###############################
    if ($_REQUEST['do'] == 'whoposted')
    {
    	if (!$threadinfo['threadid'] OR $threadinfo['isdeleted'] OR (!$threadinfo['visible'] AND !can_moderate($threadinfo['forumid'], 'canmoderateposts')))
    	{
    		eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
    	}
    
    	($hook = vBulletinHook::fetch_hook('misc_whoposted_start')) ? eval($hook) : false;
    
    	$forumperms = fetch_permissions($threadinfo['forumid']);
    	if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
    	{
    		print_no_permission();
    	}
    	if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] OR !$vbulletin->userinfo['userid']))
    	{
    		print_no_permission();
    	}
    
    	$posts = $db->query_read_slave("
    		SELECT COUNT(postid) AS posts,
    			post.username AS postuser,user.userid,user.username
    		FROM " . TABLE_PREFIX . "post AS post
    		LEFT JOIN " . TABLE_PREFIX . "user AS user USING(userid)
    		WHERE threadid = $threadinfo[threadid]
    			AND visible = 1
    		GROUP BY userid
    		ORDER BY posts DESC
    	");
    
    	$totalposts = 0;
    	$posters = '';
    	if ($db->num_rows($posts))
    	{
    		require_once(DIR . '/includes/functions_bigthree.php');
    		while ($post = $db->fetch_array($posts))
    		{
    			// hide users in Coventry
    			$ast = '';
    			if (in_coventry($post['userid']) AND !can_moderate($threadinfo['forumid']))
    			{
    				continue;
    			}
    
    			exec_switch_bg();
    			if ($post['username'] == '')
    			{
    				$post['username'] = $post['postuser'];
    			}
    			$post['username'] .=  $ast;
    			$totalposts += $post['posts'];
    			$post['posts'] = vb_number_format($post['posts']);
    			$show['memberlink'] = iif ($post['userid'], true, false);
    			$templater = vB_Template::create('whopostedbit');
    				$templater->register('bgclass', $bgclass);
    				$templater->register('post', $post);
    				$templater->register('threadinfo', $threadinfo);
    			$posters .= $templater->render();
    		}
    		$totalposts = vb_number_format($totalposts);
    
    		($hook = vBulletinHook::fetch_hook('misc_whoposted_complete')) ? eval($hook) : false;
    
    		$templater = vB_Template::create('WHOPOSTED');
    			$templater->register_page_templates();
    			$templater->register('posters', $posters);
    			$templater->register('threadinfo', $threadinfo);
    			$templater->register('totalposts', $totalposts);
    		print_output($templater->render());
    	}
    	else
    	{
    		eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
    	}
    }
    
    // ############################### start show attachments ###############################
    if ($_REQUEST['do'] == 'showattachments')
    {
    	if (!$threadinfo['threadid'] OR $threadinfo['isdeleted'] OR (!$threadinfo['visible'] AND !can_moderate($threadinfo['forumid'], 'canmoderateposts')))
    	{
    		eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
    	}
    
    	($hook = vBulletinHook::fetch_hook('misc_showattachments_start')) ? eval($hook) : false;
    
    	$forumperms = fetch_permissions($threadinfo['forumid']);
    	if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads']))
    	{
    		print_no_permission();
    	}
    	if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewothers']) AND ($threadinfo['postuserid'] != $vbulletin->userinfo['userid'] OR !$vbulletin->userinfo['userid']))
    	{
    		print_no_permission();
    	}
    
    	require_once(DIR . '/includes/class_bootstrap_framework.php');
    	require_once(DIR . '/vb/types.php');
    	vB_Bootstrap_Framework::init();
    	$types = vB_Types::instance();
    	$contenttypeid = $types->getContentTypeID('vBForum_Post');
    
    	$attachs = $db->query_read_slave("
    		SELECT a.*, fd.filesize
    		FROM " . TABLE_PREFIX . "post AS post
    		INNER JOIN " . TABLE_PREFIX . "attachment AS a ON (a.contentid = post.postid AND a.state = 'visible')
    		INNER JOIN " . TABLE_PREFIX . "filedata AS fd ON (a.filedataid = fd.filedataid)
    		WHERE
    			threadid = $threadinfo[threadid]
    				AND
    			post.visible = 1
    				AND
    			a.contenttypeid = $contenttypeid
    		ORDER BY a.filename DESC
    	");
    
    	if ($db->num_rows($attachs))
    	{
    		require_once(DIR . '/includes/functions_bigthree.php');
    		while ($attachment = $db->fetch_array($attachs))
    		{
    			// hide users in Coventry
    			$ast = '';
    			if (in_coventry($attachment['userid']) AND !can_moderate($threadinfo['forumid']))
    			{
    				continue;
    			}
    
    			$attachment['filename'] = fetch_censored_text(htmlspecialchars_uni($attachment['filename']));
    			$attachment['attachmentextension'] = strtolower(file_extension($attachment['filename']));
    			$attachment['filesize'] = vb_number_format($attachment['filesize'], 1, true);
    
    			exec_switch_bg();
    
    			$templater = vB_Template::create('attachmentbit');
    				$templater->register('attachment', $attachment);
    				$templater->register('bgclass', $bgclass);
    			$attachments .= $templater->render();
    		}
    
    		($hook = vBulletinHook::fetch_hook('misc_showattachments_complete')) ? eval($hook) : false;
    
    		$templater = vB_Template::create('ATTACHMENTS');
    			$templater->register_page_templates();
    			$templater->register('attachments', $attachments);
    			$templater->register('threadinfo', $threadinfo);
    			$templater->register('totalattachments', $db->num_rows($attachs));
    		print_output($templater->render());
    	}
    	else
    	{
    		eval(standard_error(fetch_error('noattachments')));
    	}
    }
    
    // ############################### start bbcode ###############################
    if ($_REQUEST['do'] == 'bbcode')
    {
    
    	($hook = vBulletinHook::fetch_hook('misc_bbcode_start')) ? eval($hook) : false;
    	require_once(DIR . '/includes/class_bbcode.php');
    
    	$show['bbcodebasic'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_BASIC) ? true : false;
    	$show['bbcodecolor'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_COLOR) ? true : false;
    	$show['bbcodesize'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_SIZE) ? true : false;
    	$show['bbcodefont'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_FONT) ? true : false;
    	$show['bbcodealign'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_ALIGN) ? true : false;
    	$show['bbcodelist'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_LIST) ? true : false;
    	$show['bbcodeurl'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_URL) ? true : false;
    	$show['bbcodecode'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_CODE) ? true : false;
    	$show['bbcodephp'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_PHP) ? true : false;
    	$show['bbcodehtml'] = ($vbulletin->options['allowedbbcodes'] & ALLOW_BBCODE_HTML) ? true : false;
    	$show['bbcodesigpic'] = ($permissions['signaturepermissions'] & $vbulletin->bf_ugp_signaturepermissions['cansigpic']) ? true : false;
    
    	$template['bbcodebits'] = '';
    
    	$specialbbcode[] = array();
    
    	$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
    
    	$bbcodes = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "bbcode ORDER BY bbcodetag, twoparams");
    	while ($bbcode = $db->fetch_array($bbcodes))
    	{
    		$bbcode['output'] = $bbcode_parser->do_parse($bbcode['bbcodeexample'], false, false, true, false, true);
    
    		$bbcode['bbcodeexample'] = htmlspecialchars_uni($bbcode['bbcodeexample']);
    		if ($bbcode['twoparams'])
    		{
    			$bbcode['tag'] = '[' . $bbcode['bbcodetag'] . '=<span class="highlight">' . $vbphrase['option'] . '</span>]<span class="highlight">' . $vbphrase['value'] . '</span>[/' . $bbcode['bbcodetag'] . ']';
    		}
    		else
    		{
    			$bbcode['tag'] = '[' . $bbcode['bbcodetag'] . ']<span class="highlight">' . $vbphrase['value'] . '</span>[/' . $bbcode['bbcodetag'] . ']';
    		}
    
    		($hook = vBulletinHook::fetch_hook('misc_bbcode_bit')) ? eval($hook) : false;
    
    		$templater = vB_Template::create('help_bbcodes_bbcode');
    			$templater->register('bbcode', $bbcode);
    		$template['bbcodebits'] .= $templater->render();
    		$templater = vB_Template::create('help_bbcodes_link');
    			$templater->register('bbcode', $bbcode);
    		$template['bbcodelinks'] .= $templater->render();
    	}
    
    	$navbits = construct_navbits(array(
    		'faq.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'],
    		'' => $vbphrase['bbcode_list']
    	));
    
    	$show['iewidthfix'] = (is_browser('ie') AND !(is_browser('ie', 6)));
    
    	$vbulletin->options['allowhtml'] = false;
    	$vbulletin->options['allowbbcode'] = true;
    
    	// ### CODE tag
    	$specialbbcode['code'] = $bbcode_parser->parse("[code]<script type=\"text/javascript\">\n<!--\n\talert(\"Hello world!\");\n//-->\n</script>
    ", 0, false);

    // ### HTML Tag
    $specialbbcode['html'] = $bbcode_parser->parse("
    HTML:
    <img src=\"image.gif\" alt=\"image\" />\n<a href=\"testing.html\" target=\"_blank\">Testing</a>
    ", 0, false);

    // ### PHP Tag
    $specialbbcode['php'] = $bbcode_parser->parse("
    PHP:
    \$myvar 'Hello World!';\nfor (\$i 0; \$i 10; \$i++)\n{\n\techo \$myvar . \"\\n\";\n}
    ", 0, false);

    // ### Quote Tag
    $specialbbcode['quote1'] = $bbcode_parser->parse("
    ", 0, false);
    $specialbbcode['quote2'] = $bbcode_parser->parse("
    ", 0, false);

    $max_post = $db->query_first_slave("SELECT MAX(postid) AS maxpostid FROM " . TABLE_PREFIX . "post");
    $max_post['maxpostid'] = intval($max_post['maxpostid']);
    $specialbbcode['quote3'] = $bbcode_parser->parse("
    ", 0, false);

    // ### Special URL for Image
    if (preg_match('#^[a-z0-9]+://#si', vB_Template_Runtime::fetchStyleVar('imgdir_statusicon')))
    {
    $statusicon_dir = vB_Template_Runtime::fetchStyleVar('imgdir_statusicon');
    }
    else
    {
    $statusicon_dir = $vbulletin->options['bburl'] . '/' . vB_Template_Runtime::fetchStyleVar('imgdir_statusicon');
    }

    $navbar = render_navbar_template($navbits);

    ($hook = vBulletinHook::fetch_hook('misc_bbcode_complete')) ? eval($hook) : false;

    $templater = vB_Template::create('help_bbcodes');
    $templater->register_page_templates();
    $templater->register('i', $i);
    $templater->register('max_post', $max_post);
    $templater->register('myvar', $myvar);
    $templater->register('navbar', $navbar);
    $templater->register('specialbbcode', $specialbbcode);
    $templater->register('statusicon_dir', $statusicon_dir);
    $templater->register('template', $template);
    print_output($templater->render());
    }

    // ############################### Popup Smilies for vbCode ################
    if ($_REQUEST['do'] == 'getsmilies')
    {
    $editorid = $vbulletin->input->clean_gpc('r', 'editorid', TYPE_NOHTML);
    $editorid = preg_replace('#[^a-z0-9_]#i', '', $editorid);

    ($hook = vBulletinHook::fetch_hook('misc_smiliespopup_start')) ? eval($hook) : false;

    $result = $db->query_read_slave("
    SELECT smilietext AS text, smiliepath AS path, smilie.title, smilieid,
    imagecategory.title AS category
    FROM " . TABLE_PREFIX . "smilie AS smilie
    LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
    ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
    ");

    $categories = array();
    while ($smilie = $db->fetch_array($result))
    {
    $categories[$smilie['category']][] = $smilie;
    }

    $categorybits = '';
    foreach ($categories AS $category => $smilies)
    {
    ($hook = vBulletinHook::fetch_hook('misc_smiliespopup_category')) ? eval($hook) : false;

    $smiliebits = '';
    foreach ($smilies AS $smilie)
    {
    ($hook = vBulletinHook::fetch_hook('misc_smiliespopup_smilie')) ? eval($hook) : false;

    $smilie['js'] = addslashes_js($smilie['text']);

    $templater = vB_Template::create('smiliepopup_smilie');
    $templater->quickRegister($smilie);
    $smiliebits .= $templater->render();
    }

    $templater = vB_Template::create('smiliepopup_category');
    $templater->register('title', $category);
    $templater->register('smiliebits', $smiliebits);
    $categorybits .= $templater->render();
    }

    ($hook = vBulletinHook::fetch_hook('misc_smiliespopup_complete')) ? eval($hook) : false;

    $templater = vB_Template::create('smiliepopup');
    $templater->register_page_templates();
    $templater->register('editorid', $editorid);
    $templater->register('categorybits', $categorybits);
    $templater->register('wysiwyg', $wysiwyg);
    print_output($templater->render());

    }

    $vbulletin->input->clean_gpc('r', 'template', TYPE_NOHTML);

    // ############################### start any page ###############################
    if ($_REQUEST['do'] == 'debug_page' AND $vbulletin->GPC['template'] != '')
    {
    if (!$vbulletin->debug)
    {
    print_no_permission();
    }

    $template_name = preg_replace('#[^a-z0-9_]#i', '', $vbulletin->GPC['template']);

    $navbits = construct_navbits(array('' => $template_name));
    $navbar = render_navbar_template($navbits);

    $templater = vB_Template::create($template_name);
    $templater->register_page_templates();
    $templater->register('navbar', $navbar);
    print_output($templater->render());
    }

    if ($_REQUEST['do'] == 'page' AND $vbulletin->GPC['template'] != '')
    {
    $template_name = preg_replace('#[^a-z0-9_]#i', '', $vbulletin->GPC['template']);

    $navbits = construct_navbits(array('' => $template_name));
    $navbar = render_navbar_template($navbits);

    $templater = vB_Template::create('custom_' . $template_name);
    $templater->register_page_templates();
    $templater->register('navbar', $navbar);
    $templater->register('pagetitle', $pagetitle);
    print_output($templater->render());
    }

    if ($_REQUEST['do'] == 'generic')
    {

    $navbits = construct_navbits(array('' => 'Generic Shell'));
    $navbar = render_navbar_template($navbits);

    $templater = vB_Template::create('GENERIC_SHELL');
    $templater->register_page_templates();
    $templater->register('navbar', $navbar);
    $templater->register('pagetitle', 'Generic Shell');
    print_output($templater->render());
    }

    // ############################### start show rules ###############################
    if ($_REQUEST['do'] == 'showrules')
    {
    $navbits = construct_navbits(array(
    '' => $vbphrase['forum_rules']
    ));

    $navbar = render_navbar_template($navbits);
    $templater = vB_Template::create('help_rules');
    $templater->register_page_templates();
    $templater->register('navbar', $navbar);
    print_output($templater->render());
    }

    $_REQUEST['do'] = 'showsmilies';

    // ############################### start show smilies ###############################
    if ($_REQUEST['do'] == 'showsmilies')
    {
    $smiliebits = '';

    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_start')) ? eval($hook) : false;

    $smilies = $db->query_read_slave("
    SELECT smilietext,smiliepath,smilie.title,imagecategory.title AS category
    FROM " . TABLE_PREFIX . "smilie AS smilie
    LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
    ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
    ");

    while ($smilie = $db->fetch_array($smilies))
    {
    $smilie['title'] = htmlspecialchars_uni($smilie['title']);

    if ($smilie['category'] != $lastcat)
    {
    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_category')) ? eval($hook) : false;

    $templater = vB_Template::create('help_smilies_category');
    $templater->register('smilie', $smilie);
    $smiliebits .= $templater->render();
    }
    exec_switch_bg();

    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_smilie')) ? eval($hook) : false;

    $templater = vB_Template::create('help_smilies_smilie');
    $templater->register('bgclass', $bgclass);
    $templater->register('smilie', $smilie);
    $smiliebits .= $templater->render();
    $lastcat = $smilie['category'];
    }

    $navbits = construct_navbits(array(
    'faq.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['faq'],
    '' => $vbphrase['smilie_list']
    ));

    $navbar = render_navbar_template($navbits);

    ($hook = vBulletinHook::fetch_hook('misc_smilieslist_complete')) ? eval($hook) : false;

    $templater = vB_Template::create('help_smilies');
    $templater->register_page_templates();
    $templater->register('navbar', $navbar);
    $templater->register('smiliebits', $smiliebits);
    print_output($templater->render());
    }

    /*======================================================================*\
    || ####################################################################
    || #
    || # CVS: $RCSfile$ - $Revision: 35803 $
    || ####################################################################
    \*======================================================================*/
    [/CODE]
    I use Cloudlinux.
    How can use this User 90MB Ram for this Script when i set the memory_limit in WHM of 32MB ??????
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    misc.php can and does do multiple things on the forums for instance a chatbox might use it, but is that a/the problem? Where are you getting those messages from? CSF/LFD possibly?
     
  3. Slatko

    Slatko Member

    Joined:
    Jan 21, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    I get this from IFD
    Message:
    Code:
    Excessive processes running under user XXX
    An other message same User:
    Code:
    Suspicious process running under user XXX
    Code:
    Time:    Fri Jan 28 21:56:33 2011 +0200
    PID:     8460
    Account: eichbaum
    Uptime:  68 seconds
    
    
    Executable:
    
    /usr/bin/php
    
    
    Command Line (often faked in exploits):
    
    /usr/bin/php /home/eichbaum/public_html/misc.php
    
    
    Network connections by the process (if any):
    
    tcp: 127.0.0.1:49690 -> 127.0.0.1:3306
    
    
    Files open by the process (if any):
    
    /dev/lve
    
    
    Memory maps by the process (if any):
    
    00400000-00839000 r-xp 00000000 09:00 43421849                           /usr/bin/php
    00a39000-00a93000 rw-p 00439000 09:00 43421849                           /usr/bin/php
    00a93000-00a9c000 rw-p 00a93000 00:00 0
    13b67000-145cf000 rw-p 13b67000 00:00 0                                  [heap]
    - Zitierten Text anzeigen -
    3985c00000-3985c1c000 r-xp 00000000 09:00 313000129                      /lib64/ld-2.5.so
    3985e1b000-3985e1c000 r--p 0001b000 09:00 313000129                      /lib64/ld-2.5.so
    3985e1c000-3985e1d000 rw-p 0001c000 09:00 313000129                      /lib64/ld-2.5.so
    3986000000-398614e000 r-xp 00000000 09:00 313000132                      /lib64/libc-2.5.so
    398614e000-398634d000 ---p 0014e000 09:00 313000132                      /lib64/libc-2.5.so
    398634d000-3986351000 r--p 0014d000 09:00 313000132                      /lib64/libc-2.5.so
    3986351000-3986352000 rw-p 00151000 09:00 313000132                      /lib64/libc-2.5.so
    3986352000-3986357000 rw-p 3986352000 00:00 0
    3986400000-3986402000 r-xp 00000000 09:00 313000164                      /lib64/libdl-2.5.so
    3986402000-3986602000 ---p 00002000 09:00 313000164                      /lib64/libdl-2.5.so
    3986602000-3986603000 r--p 00002000 09:00 313000164                      /lib64/libdl-2.5.so
    3986603000-3986604000 rw-p 00003000 09:00 313000164                      /lib64/libdl-2.5.so
    3986800000-3986816000 r-xp 00000000 09:00 313000161                      /lib64/libpthread-2.5.so
    3986816000-3986a15000 ---p 00016000 09:00 313000161                      /lib64/libpthread-2.5.so
    3986a15000-3986a16000 r--p 00015000 09:00 313000161                      /lib64/libpthread-2.5.so
    3986a16000-3986a17000 rw-p 00016000 09:00 313000161                      /lib64/libpthread-2.5.so
    3986a17000-3986a1b000 rw-p 3986a17000 00:00 0
    3986c00000-3986c82000 r-xp 00000000 09:00 313000138                      /lib64/libm-2.5.so
    3986c82000-3986e81000 ---p 00082000 09:00 313000138                      /lib64/libm-2.5.so
    3986e81000-3986e82000 r--p 00081000 09:00 313000138                      /lib64/libm-2.5.so
    3986e82000-3986e83000 rw-p 00082000 09:00 313000138                      /lib64/libm-2.5.so
    3987000000-3987014000 r-xp 00000000 09:00 43430801                       /usr/lib64/libz.so.1.2.3
    3987014000-3987213000 ---p 00014000 09:00 43430801                       /usr/lib64/libz.so.1.2.3
    3987213000-3987214000 rw-p 00013000 09:00 43430801                       /usr/lib64/libz.so.1.2.3
    3987400000-3987415000 r-xp 00000000 09:00 313000177                      /lib64/libselinux.so.1
    3987415000-3987615000 ---p 00015000 09:00 313000177                      /lib64/libselinux.so.1
    3987615000-3987617000 rw-p 00015000 09:00 313000177                      /lib64/libselinux.so.1
    3987617000-3987618000 rw-p 3987617000 00:00 0
    3987800000-398783b000 r-xp 00000000 09:00 313000175                      /lib64/libsepol.so.1
    398783b000-3987a3b000 ---p 0003b000 09:00 313000175                      /lib64/libsepol.so.1
    3987a3b000-3987a3c000 rw-p 0003b000 09:00 313000175                      /lib64/libsepol.so.1
    3987a3c000-3987a46000 rw-p 3987a3c000 00:00 0
    3987c00000-3987c07000 r-xp 00000000 09:00 313000168                      /lib64/librt-2.5.so
    3987c07000-3987e07000 ---p 00007000 09:00 313000168                      /lib64/librt-2.5.so
    3987e07000-3987e08000 r--p 00007000 09:00 313000168                      /lib64/librt-2.5.so
    3987e08000-3987e09000 rw-p 00008000 09:00 313000168                      /lib64/librt-2.5.so
    3988000000-3988009000 r-xp 00000000 09:00 313000240                      /lib64/libcrypt-2.5.so
    3988009000-3988208000 ---p 00009000 09:00 313000240                      /lib64/libcrypt-2.5.so
    3988208000-3988209000 r--p 00008000 09:00 313000240                      /lib64/libcrypt-2.5.so
    3988209000-398820a000 rw-p 00009000 09:00 313000240                      /lib64/libcrypt-2.5.so
    398820a000-3988238000 rw-p 398820a000 00:00 0
    3988400000-3988415000 r-xp 00000000 09:00 313000151                      /lib64/libnsl-2.5.so
    3988415000-3988614000 ---p 00015000 09:00 313000151                      /lib64/libnsl-2.5.so
    3988614000-3988615000 r--p 00014000 09:00 313000151                      /lib64/libnsl-2.5.so
    3988615000-3988616000 rw-p 00015000 09:00 313000151                      /lib64/libnsl-2.5.so
    3988616000-3988618000 rw-p 3988616000 00:00 0
    3988800000-398880d000 r-xp 00000000 09:00 313000149                      /lib64/libgcc_s-4.1.2-20080825.so.1
    398880d000-3988a0d000 ---p 0000d000 09:00 313000149                      /lib64/libgcc_s-4.1.2-20080825.so.1
    3988a0d000-3988a0e000 rw-p 0000d000 09:00 313000149                      /lib64/libgcc_s-4.1.2-20080825.so.1
    3988c00000-3988d2d000 r-xp 00000000 09:00 313000252                      /lib64/libcrypto.so.0.9.8e
    3988d2d000-3988f2c000 ---p 0012d000 09:00 313000252                      /lib64/libcrypto.so.0.9.8e
    3988f2c000-3988f4d000 rw-p 0012c000 09:00 313000252                      /lib64/libcrypto.so.0.9.8e
    3988f4d000-3988f51000 rw-p 3988f4d000 00:00 0
    3989000000-39890e6000 r-xp 00000000 09:00 43430794                       /usr/lib64/libstdc++.so.6.0.8
    39890e6000-39892e5000 ---p 000e6000 09:00 43430794                       /usr/lib64/libstdc++.so.6.0.8
    39892e5000-39892eb000 r--p 000e5000 09:00 43430794                       /usr/lib64/libstdc++.so.6.0.8
    39892eb000-39892ee000 rw-p 000eb000 09:00 43430794                       /usr/lib64/libstdc++.so.6.0.8
    39892ee000-3989300000 rw-p 39892ee000 00:00 0
    3989400000-398942c000 r-xp 00000000 09:00 43430890                       /usr/lib64/libgssapi_krb5.so.2.2
    398942c000-398962c000 ---p 0002c000 09:00 43430890                       /usr/lib64/libgssapi_krb5.so.2.2
    398962c000-398962e000 rw-p 0002c000 09:00 43430890                       /usr/lib64/libgssapi_krb5.so.2.2
    3989800000-3989934000 r-xp 00000000 09:00 43430320                       /usr/lib64/libmysqlclient.so.15.0.0
    3989934000-3989b34000 ---p 00134000 09:00 43430320                       /usr/lib64/libmysqlclient.so.15.0.0
    3989b34000-3989b68000 rw-p 00134000 09:00 43430320                       /usr/lib64/libmysqlclient.so.15.0.0
    3989b68000-3989b69000 rw-p 3989b68000 00:00 0
    3989c00000-3989c17000 r-xp 00000000 09:00 313000188                      /lib64/libaudit.so.0.0.0
    3989c17000-3989e16000 ---p 00017000 09:00 313000188                      /lib64/libaudit.so.0.0.0
    3989e16000-3989e18000 rw-p 00016000 09:00 313000188                      /lib64/libaudit.so.0.0.0
    398a000000-398a011000 r-xp 00000000 09:00 313000250                      /lib64/libresolv-2.5.so
    398a011000-398a211000 ---p 00011000 09:00 313000250                      /lib64/libresolv-2.5.so
    398a211000-398a212000 r--p 00011000 09:00 313000250                      /lib64/libresolv-2.5.so
    398a212000-398a213000 rw-p 00012000 09:00 313000250                      /lib64/libresolv-2.5.so
    398a213000-398a215000 rw-p 398a213000 00:00 0
    398a400000-398a402000 r-xp 00000000 09:00 313000251                      /lib64/libcom_err.so.2.1
    398a402000-398a601000 ---p 00002000 09:00 313000251                      /lib64/libcom_err.so.2.1
    398a601000-398a602000 rw-p 00001000 09:00 313000251                      /lib64/libcom_err.so.2.1
    398a800000-398a802000 r-xp 00000000 09:00 313000005                      /lib64/libkeyutils-1.2.so
    398a802000-398aa01000 ---p 00002000 09:00 313000005                      /lib64/libkeyutils-1.2.so
    398aa01000-398aa02000 rw-p 00001000 09:00 313000005                      /lib64/libkeyutils-1.2.so
    398ac00000-398ac46000 r-xp 00000000 09:00 313000256                      /lib64/libssl.so.0.9.8e
    398ac46000-398ae46000 ---p 00046000 09:00 313000256                      /lib64/libssl.so.0.9.8e
    398ae46000-398ae4c000 rw-p 00046000 09:00 313000256                      /lib64/libssl.so.0.9.8e
    398b000000-398b00b000 r-xp 00000000 09:00 313000191                      /lib64/libpam.so.0.81.5
    398b00b000-398b20a000 ---p 0000b000 09:00 313000191                      /lib64/libpam.so.0.81.5
    398b20a000-398b20b000 rw-p 0000a000 09:00 313000191                      /lib64/libpam.so.0.81.5
    398b400000-398b431000 r-xp 00000000 09:00 43430229                       /usr/lib64/libidn.so.11.5.19
    398b431000-398b630000 ---p 00031000 09:00 43430229                       /usr/lib64/libidn.so.11.5.19
    398b630000-398b631000 rw-p 00030000 09:00 43430229                       /usr/lib64/libidn.so.11.5.19
    398b800000-398b808000 r-xp 00000000 09:00 43425639                       /usr/lib64/libkrb5support.so.0.1
    398b808000-398ba07000 ---p 00008000 09:00 43425639                       /usr/lib64/libkrb5support.so.0.1
    398ba07000-398ba08000 rw-p 00007000 09:00 43425639                       /usr/lib64/libkrb5support.so.0.1
    398bc00000-398bc91000 r-xp 00000000 09:00 43430889                       /usr/lib64/libkrb5.so.3.3
    398bc91000-398be91000 ---p 00091000 09:00 43430889                       /usr/lib64/libkrb5.so.3.3
    398be91000-398be95000 rw-p 00091000 09:00 43430889                       /usr/lib64/libkrb5.so.3.3
    398c000000-398c024000 r-xp 00000000 09:00 43430888                       /usr/lib64/libk5crypto.so.3.1
    398c024000-398c223000 ---p 00024000 09:00 43430888                       /usr/lib64/libk5crypto.so.3.1
    398c223000-398c225000 rw-p 00023000 09:00 43430888                       /usr/lib64/libk5crypto.so.3.1
    2ada02e5a000-2ada02e5c000 rw-p 2ada02e5a000 00:00 0
    2ada02e69000-2ada02e6b000 rw-p 2ada02e69000 00:00 0
    2ada02e6b000-2ada02e9c000 r-xp 00000000 09:00 208273412                  /opt/pcre/lib/libpcre.so.0.0.1
    2ada02e9c000-2ada0309c000 ---p 00031000 09:00 208273412                  /opt/pcre/lib/libpcre.so.0.0.1
    2ada0309c000-2ada0309d000 rw-p 00031000 09:00 208273412                  /opt/pcre/lib/libpcre.so.0.0.1
    2ada0309d000-2ada030a0000 rw-p 2ada0309d000 00:00 0
    2ada030a0000-2ada030ef000 r-xp 00000000 09:00 208273546                  /opt/curlssl/lib/libcurl.so.4.2.0
    2ada030ef000-2ada032ef000 ---p 0004f000 09:00 208273546                  /opt/curlssl/lib/libcurl.so.4.2.0
    2ada032ef000-2ada032f2000 rw-p 0004f000 09:00 208273546                  /opt/curlssl/lib/libcurl.so.4.2.0
    2ada032f2000-2ada032f3000 rw-p 2ada032f2000 00:00 0
    2ada032f3000-2ada0342b000 r-xp 00000000 09:00 208273760                  /opt/xml2/lib/libxml2.so.2.7.6
    2ada0342b000-2ada0362a000 ---p 00138000 09:00 208273760                  /opt/xml2/lib/libxml2.so.2.7.6
    2ada0362a000-2ada03634000 rw-p 00137000 09:00 208273760                  /opt/xml2/lib/libxml2.so.2.7.6
    2ada03634000-2ada0363b000 rw-p 2ada03634000 00:00 0
    2ada0367c000-2ada03747000 r-xp 00000000 09:00 44074277                   /usr/local/IonCube/ioncube_loader_lin_5.2.so
    2ada03747000-2ada03847000 ---p 000cb000 09:00 44074277                   /usr/local/IonCube/ioncube_loader_lin_5.2.so
    2ada03847000-2ada03856000 rw-p 000cb000 09:00 44074277                   /usr/local/IonCube/ioncube_loader_lin_5.2.so
    2ada03856000-2ada03859000 rw-p 2ada03856000 00:00 0
    2ada03859000-2ada0387a000 r-xp 00000000 09:00 44466868                   /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so
    2ada0387a000-2ada03a7a000 ---p 00021000 09:00 44466868                   /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so
    2ada03a7a000-2ada03a80000 rw-p 00021000 09:00 44466868                   /usr/local/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so
    2ada03a80000-2ada03a82000 rw-p 2ada03a80000 00:00 0
    2ada03a8f000-2ada03a99000 r-xp 00000000 09:00 312999962                  /lib64/libnss_files-2.5.so
    2ada03a99000-2ada03c98000 ---p 0000a000 09:00 312999962                  /lib64/libnss_files-2.5.so
    2ada03c98000-2ada03c99000 r--p 00009000 09:00 312999962                  /lib64/libnss_files-2.5.so
    2ada03c99000-2ada03c9a000 rw-p 0000a000 09:00 312999962                  /lib64/libnss_files-2.5.so
    2ada03c9a000-2ada03e9e000 rw-p 2ada03c9a000 00:00 0
    2ada03e9e000-2ada03ea5000 r--s 00000000 09:00 43516161                   /usr/lib64/gconv/gconv-modules.cache
    2ada03ea5000-2ada03ea6000 r-xp 00000000 09:00 43516086                   /usr/lib64/gconv/ISO8859-1.so
    2ada03ea6000-2ada040a6000 ---p 00001000 09:00 43516086                   /usr/lib64/gconv/ISO8859-1.so
    2ada040a6000-2ada040a8000 rw-p 00001000 09:00 43516086                   /usr/lib64/gconv/ISO8859-1.so
    7ffff414c000-7ffff4176000 rw-p 7ffffffd4000 00:00 0                      [stack]
    I ask because i set the Limit in memory_limit to 32 MB, how can use this User about 86MB ram?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    The memory limit can be increased using a custom php.ini or .htaccess. Have a check on the domain for these files.
     
  6. Slatko

    Slatko Member

    Joined:
    Jan 21, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Thank you :D
    I think
    Code:
    /etc/security/limits.conf
    
    is what i searched.
    So i use Cloudlinux for Controll CPU Usage and Conections.
    Now i want set Limit for Ram usage.
    In /etc/security/limits.conf i have this opinions:
    Code:
    # /etc/security/limits.conf
    #
    #Each line describes a limit for a user in the form:
    #
    #<domain>        <type>  <item>  <value>
    #
    #Where:
    #<domain> can be:
    #        - an user name
    #        - a group name, with @group syntax
    #        - the wildcard *, for default entry
    #        - the wildcard %, can be also used with %group syntax,
    #                 for maxlogin limit
    #
    #<type> can have the two values:
    #        - "soft" for enforcing the soft limits
    #        - "hard" for enforcing hard limits
    #
    #<item> can be one of the following:
    #        - core - limits the core file size (KB)
    #        - data - max data size (KB)
    #        - fsize - maximum filesize (KB)
    #        - memlock - max locked-in-memory address space (KB)
    #        - nofile - max number of open files
    #        - rss - max resident set size (KB)
    #        - stack - max stack size (KB)
    #        - cpu - max CPU time (MIN)
    #        - nproc - max number of processes
    #        - as - address space limit
    #        - maxlogins - max number of logins for this user
    #        - maxsyslogins - max number of logins on the system
    #        - priority - the priority to run user process with
    #        - locks - max number of file locks the user can hold
    #        - sigpending - max number of pending signals
    #        - msgqueue - max memory used by POSIX message queues (bytes)
    #        - nice - max nice priority allowed to raise to
    #        - rtprio - max realtime priority
    #
    #<domain>      <type>  <item>         <value>
    #
    
    #*               soft    core            0
    #*               hard    rss             10000
    #@student        hard    nproc           20
    #@faculty        soft    nproc           20
    #@faculty        hard    nproc           50
    #ftp             hard    nproc           0
    #@student        -	 maxlogins	 4
    # End of file
    
    So what is the right value for Ram usage?
     
Loading...

Share This Page