我已经有这个用户了..还活着并踢了 3 个主表,即 jos_user 和其他 2 个 acro_ 和 acro_map ......当我使用来自组件的联系按钮时,我得到了这个错误。
以下是错误:
JUser::_load: Unable to load user with id: 160529
Error loading Modules:MySQL server has gone away SQL=SELECT m.*, am.params as adv_params FROM jos_modules as m LEFT JOIN jos_advancedmodules as am ON am.moduleid = m.id WHERE m.published = 1 AND m.access <= 1 AND m.client_id = 0 ORDER BY m.ordering, m.id
请不要担心其他错误(因为我试图为该 frm 托管服务提供商找到解决方案),但目前我对使用“联系我们”按钮时无法在此 joomla 组件中加载用户一无所知
组件的“视图”代码::
defined('_JEXEC') or die('Restricted access');
$to = "";
$subject = "";
$message = "";
$Itemid = JRequest::getInt('Itemid');
$to = $this->msgSendInfo[0];
$subject = $this->msgSendInfo[1];
$message = $this->msgSendInfo[2];
$document =& JFactory::getDocument();
$document->addScriptDeclaration($this->script);
$document->addScriptDeclaration($this->users);
?>
<!-- Title -->
<div class="fsl_h3title"><b><?php echo JText::_('JBJOBS_NEWMESSAGE'); ?></b></div>
<!--<div runat="server" ID="divContent" class="border" contenteditable="true">
<?php echo $message; ?>
</div>-->
<!-- Begin Form for message -->
<form action="index.php" method="post" name="adminForm" id="adminForm" >
<div class="col100">
<table class="admintable jbj_tblborder" width="100%">
<tr>
<td width="100" align="right" class="key">
<label for="to">
<?php echo JText::_( 'JBJOBS_TO' ); ?>:
</label>
</td>
<td>
<input class="text_area" type="text" name="to" id="to" size="32" maxlength="100" value="<?php echo $to; ?>" onkeyup="return getUser()" readonly />
<!--<select id="toList" style="width: 200px; float: left; margin-left: 8px; vertical-align: middle;" onchange="return setUser()" size="2">
<option><?php echo JText::_( 'JBJOBS_NOSUGGESTIONS' ); ?></option>
</select>-->
</td>
</tr>
<tr>
<td width="100" align="right" class="key">
<label for="subject">
<?php echo JText::_( 'JBJOBS_SUBJECT' ); ?>:
</label>
</td>
<td>
<input class="text_area" type="text" name="subject" id="subject" size="48" maxlength="100" value="<?php echo $subject; ?>" />
</td>
</tr>
<tr>
<td width="100" align="right" class="key">
<label for="message">
<?php echo JText::_( 'JBJOBS_MESSAGE' ); ?>:
</label>
</td>
<td>
<?php
$editor =& JFactory::getEditor();
echo $editor->display('message', $message, '500', '300', '60', '10', true);
?>
</td>
<!-- Do NOT remove these two input boxes -->
<input type='hidden' id='temp' />
<input type='hidden' id='temp2' />
</tr>
<tr>
<td width="100" align="right" class="key">
<label for="submit">
</label>
</td>
<td>
<input class="button" type="submit" name="submit" id="submit" size="32" maxlength="100" value="<?php echo JText::_( 'JBJOBS_SEND' ); ?>" />
</td>
</tr>
</table>
</div>
<div class="clr"></div> <!-- Clears the float -->
<!-- Do not edit after this point, it does not change the visual style -->
<input type="hidden" name="option" value="com_jbjobs" />
<input type="hidden" name="task" value="savemessage" />
<input type="hidden" name="controller" value="jbmessaging" />
<input type="hidden" name="Itemid" id="Itemid" value="<?php echo $Itemid; ?>" />
<?php
jimport('joomla.utilities.date');
$now = new JDate();
$date = $now->toMySQL();
$user =& JFactory::getUser();
?>
<input type="hidden" name="date" value="<?php echo $date; ?>" />
<input type="hidden" name="idFrom" value="<?php echo $user->id; ?>" />
<input type="hidden" name="<?php echo JUtility::getToken(); ?>" value="1" />
</form>
<script type='text/javascript'>
<!--
getUser();
//-->
</script>
编辑:我的主人提供的一条说明(对过去 6 个月的辛勤工作的最后一击)
感谢您的联系。问题似乎出在巨大的 joomla 用户表上:
# 1267920 users in jos users"
ls -laSh /var/lib/mysql/_final1
total 868M
-rw-rw---- 1 mysql mysql 452M May 2 04:51 jos_jbjobs_jobseeker.MYD
-rw-rw---- 1 mysql mysql 155M May 2 16:47 jos_users.MYD
-rw-rw---- 1 mysql mysql 120M May 2 16:47 jos_users.MYI
-rw-rw---- 1 mysql mysql 45M May 2 04:51 jos_core_acl_aro.MYD
-rw-rw---- 1 mysql mysql 36M May 2 08:30 jos_core_acl_aro.MYI
-rw-rw---- 1 mysql mysql 25M May 2 04:51 jos_core_acl_groups_aro_map.MYD
-rw-rw---- 1 mysql mysql 13M May 2 08:30 jos_jbjobs_jobseeker.MYI
joomla 本身是每 64M 内存限制的限制
当您单击下面的此表单时:
成分 ?联系方式?新联系人
由于大量的用户:
关联用户。此联系人链接到的用户名(如果适用)。
抛出以下 64M 限制的错误
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 76 bytes) in /home/ink/public_html/libraries/joomla/database/database/mysql.php on line 462
这种情况下实际消耗的内存远不止1G。所以它不像服务器问题更像是一个 joomla 问题本身,显然 joomla 不是为这么多用户设计的。如果您有任何其他问题或疑虑,请告诉我们。
所以我猜 joomla 可能无法处理 100 万或 500 万用户?