I upgraded my MW from 1.31 to 1.33 and SMW from 2.5.6 to 3.1 by following the official tutorials. Everything works fine until Step 6 when I run rebuildData.php to rebuild the data and it throws an exception after about 10000 updates. Here is the exception message:
... updating 10281 [S: User:Reddgamer]
[d55bfb09d717f88aa3e7da6e] [no req] RuntimeException from line 58 of /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/SQLStore/Lookup/SingleEntityQueryLookup.php: Expected a ValueDescription instance!
Backtrace:
#0 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/query/SMW_QueryProcessor.php(338): SMW\SQLStore\Lookup\SingleEntityQueryLookup->getQueryResult(SMWQuery)
#1 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(364): SMWQueryProcessor::getResultFromQuery(SMWQuery, array, integer, integer)
#2 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/AskParserFunction.php(197): SMW\ParserFunctions\AskParserFunction->doFetchResultsFromFunctionParameters(array, array)
#3 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctions/ShowParserFunction.php(45): SMW\ParserFunctions\AskParserFunction->parse(array)
#4 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/ParserFunctionFactory.php(428): SMW\ParserFunctions\ShowParserFunction->parse(array)
#5 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3528): SMW\ParserFunctionFactory->SMW\{closure}(Parser, string, string)
#6 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3235): Parser->callParserFunction(PPFrame_DOM, string, array)
#7 /home/example/public_html/dev.example.com/wiki/includes/parser/Preprocessor_DOM.php(1285): Parser->braceSubstitution(array, PPFrame_DOM)
#8 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3152): PPFrame_DOM->expand(DOMElement)
#9 /home/example/public_html/dev.example.com/wiki/includes/parser/Preprocessor_DOM.php(1285): Parser->braceSubstitution(array, PPFrame_DOM)
#10 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(3049): PPFrame_DOM->expand(DOMElement, integer)
#11 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(1359): Parser->replaceVariables(string)
#12 /home/example/public_html/dev.example.com/wiki/includes/parser/Parser.php(491): Parser->internalParse(string)
#13 /home/example/public_html/dev.example.com/wiki/includes/content/WikitextContent.php(369): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#14 /home/example/public_html/dev.example.com/wiki/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#15 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/ContentParser.php(186): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#16 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/includes/ContentParser.php(145): SMW\ContentParser->fetchFromContent()
#17 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(197): SMW\ContentParser->parse()
#18 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(137): SMW\MediaWiki\Jobs\UpdateJob->parse_content()
#19 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/MediaWiki/Jobs/UpdateJob.php(94): SMW\MediaWiki\Jobs\UpdateJob->doUpdate()
#20 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/SQLStore/Rebuilder/Rebuilder.php(237): SMW\MediaWiki\Jobs\UpdateJob->run()
#21 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(423): SMW\SQLStore\Rebuilder\Rebuilder->rebuild(integer)
#22 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(349): SMW\Maintenance\DataRebuilder->do_update(integer)
#23 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/src/Maintenance/DataRebuilder.php(200): SMW\Maintenance\DataRebuilder->rebuild_all()
#24 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php(202): SMW\Maintenance\DataRebuilder->rebuild()
#25 /home/example/public_html/dev.example.com/wiki/maintenance/doMaintenance.php(96): SMW\Maintenance\RebuildData->execute()
#26 /home/example/public_html/dev.example.com/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php(261): require_once(string)
#27 {main
Does someone know why this is happening and how I could get it sorted out?
I created the bug report for you: smw issue 4349
Related
Anyone know what I'm supposed to do?
[cb49891230242084931e4968] /index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:%D7%AA%D7%91%D7%A0%D7%99%D7%AA_%D7%9E%D7%99%D7%93%D7%A2&action=submit MWException from line 95 of /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php: The lua binary (/home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua) is not executable.
Backtrace:
#0 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php(104): Scribunto_LuaStandaloneInterpreter->__construct(Scribunto_LuaStandaloneEngine, array)
#1 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(120): Scribunto_LuaStandaloneEngine->newInterpreter()
#2 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php(16): Scribunto_LuaEngine->load()
#3 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(223): Scribunto_LuaStandaloneEngine->load()
#4 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(38): Scribunto_LuaEngine->getInterpreter()
#5 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(25): Scribunto_LuaModule->getInitChunk()
#6 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/common/ScribuntoEngineBase.php(193): Scribunto_LuaModule->validate()
#7 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/common/ScribuntoContent.php(35): ScribuntoEngineBase->validate(string, string)
#8 /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/common/Hooks.php(366): ScribuntoContent->validate(Title)
#9 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/HookContainer/HookContainer.php(320): ScribuntoHooks::validateScript(DerivativeContext, ScribuntoContent, Status, string, User, boolean)
#10 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/HookContainer/HookContainer.php(131): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#11 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/HookContainer/HookRunner.php(1529): MediaWiki\HookContainer\HookContainer->run(string, array)
#12 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/EditPage.php(1903): MediaWiki\HookContainer\HookRunner->onEditFilterMergedContent(DerivativeContext, ScribuntoContent, Status, string, User, boolean)
#13 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/EditPage.php(2231): EditPage->runPostMergeFilters(ScribuntoContent, Status, User)
#14 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/EditPage.php(1723): EditPage->internalAttemptSave(NULL, boolean)
#15 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/EditPage.php(680): EditPage->attemptSave(NULL)
#16 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/actions/EditAction.php(71): EditPage->edit()
#17 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/actions/SubmitAction.php(38): EditAction->show()
#18 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/MediaWiki.php(527): SubmitAction->show()
#19 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/MediaWiki.php(313): MediaWiki->performAction(Article, Title)
#20 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/MediaWiki.php(940): MediaWiki->performRequest()
#21 /home/u657493073/domains/tzefunotwiki.com/public_html/includes/MediaWiki.php(543): MediaWiki->main()
#22 /home/u657493073/domains/tzefunotwiki.com/public_html/index.php(53): MediaWiki->run()
#23 /home/u657493073/domains/tzefunotwiki.com/public_html/index.php(46): wfIndexMain()
#24 {main}
תפריט ניווט
Try making the Lua file executable: sudo chmod +x /home/u657493073/domains/tzefunotwiki.com/public_html/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua.
While I attempted to create a database for my second wiki as a part of a wiki family I have been planning on, I have experienced various errors and access messages. One of these has to do with the user. Even though I have checked all the privileges I could see in my MySQL database manager, the backtrace shows that there are still missing permissions. Please give me information on how to fix these errors and explain what parts of the permissions are missing.
Backtrace:
#0 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(979): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#1 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1343): Wikimedia\Rdbms\Database->query(string, string)
#2 /home/gjlxrtap/public_html/mw19/includes/libs/rdbms/database/Database.php(1411): Wikimedia\Rdbms\Database->select(string, array, array, string, array, array)
#3 /home/gjlxrtap/public_html/mw19/includes/user/User.php(1287): Wikimedia\Rdbms\Database->selectRow(string, array, array, string, array)
#4 /home/gjlxrtap/public_html/mw19/includes/user/User.php(496): User->loadFromDatabase(integer)
#5 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(892): User->{closure}(boolean, integer, array, NULL)
#6 [internal function]: WANObjectCache->{closure}(boolean, integer, array, NULL)
#7 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(1012): call_user_func_array(Closure, array)
#8 /home/gjlxrtap/public_html/mw19/includes/libs/objectcache/WANObjectCache.php(898): WANObjectCache->doGetWithSetCallback(string, integer, Closure, array, NULL)
#9 /home/gjlxrtap/public_html/mw19/includes/user/User.php(521): WANObjectCache->getWithSetCallback(string, integer, Closure, array)
#10 /home/gjlxrtap/public_html/mw19/includes/user/User.php(441): User->loadFromCache()
#11 /home/gjlxrtap/public_html/mw19/includes/user/User.php(405): User->loadFromId(integer)
#12 /home/gjlxrtap/public_html/mw19/includes/session/UserInfo.php(88): User->load()
#13 /home/gjlxrtap/public_html/mw19/includes/session/CookieSessionProvider.php(119): MediaWiki\Session\UserInfo::newFromId(string)
#14 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(487): MediaWiki\Session\CookieSessionProvider->provideSessionInfo(WebRequest)
#15 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(190): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
#16 /home/gjlxrtap/public_html/mw19/includes/WebRequest.php(735): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
#17 /home/gjlxrtap/public_html/mw19/includes/session/SessionManager.php(129): WebRequest->getSession()
#18 /home/gjlxrtap/public_html/mw19/includes/Setup.php(762): MediaWiki\Session\SessionManager::getGlobalSession()
#19 /home/gjlxrtap/public_html/mw19/includes/WebStart.php(114): require_once(string)
#20 /home/gjlxrtap/public_html/mw19/index.php(40): require(string)
#21 {main}
While running a pretty average operation, my application crashed with the error message:
[error] [exception.RedBean_Exception_SQL] [22003] - SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range in '(`zurmo`.`account_read`.`count` - 1)'
This error is perplexing me because it's similar to the error message from this question, but for a MUCH smaller value / character count. Even more perplexing is the fact that I KNOW that there are larger regular int values in the database.
Now, I can go into further detail about the application, but this doesn't appear to be an issue with the application or even the database interface (redbean), even though they're both tagged here.
For futher information, here is the stack trace:
REQUEST_URI=/app/index.php/zurmo/role/details?id=4
HTTP_REFERER=https://************/app/index.php/zurmo/role/details?id=4
---
2017/08/30 07:27:57 [warning] [application] Exception class: RedBean_Exception_SQL
#0 /var/www/html/redbean/rb.php(777): RedBean_Driver_PDO->runQuery('update account_...', Array)
#1 /var/www/html/redbean/rb.php(1779): RedBean_Driver_PDO->Execute('update account_...', Array)
#2 /var/www/html/redbean/rb.php(7534): RedBean_Adapter_DBAdapter->exec('update account_...', Array)
#3 /var/www/html/redbean/rb.php(7440): RedBean_Facade::query('exec', 'update account_...', Array)
#4 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(962): RedBean_Facade::exec('update account_...')
#5 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1022): ReadPermissionsOptimizationUtil::decrementCount('account_read', 19716, Object(Role))
#6 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(1053): ReadPermissionsOptimizationUtil::decrementParentRolesCounts('account_read', 19716, Object(Role))
#7 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(668): ReadPermissionsOptimizationUtil::bulkDecrementParentRolesCounts('account_read', Array, Object(Role))
#8 /var/www/html/app/protected/modules/zurmo/utils/ReadPermissionsOptimizationUtil.php(604): ReadPermissionsOptimizationUtil::roleParentSetOrRemoved(false, Object(Role))
#9 /var/www/html/app/protected/modules/zurmo/utils/AllPermissionsOptimizationUtil.php(357): ReadPermissionsOptimizationUtil::roleParentBeingRemoved(Object(Role))
#10 /var/www/html/app/protected/modules/zurmo/models/Role.php(181): AllPermissionsOptimizationUtil::roleParentBeingRemoved(Object(Role))
#11 /var/www/html/app/protected/core/models/RedBeanModel.php(1909): Role->beforeSave()
#12 /var/www/html/app/protected/modules/zurmo/models/Item.php(123): RedBeanModel->save(false, NULL)
#13 /var/www/html/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(162): Item->save(false)
#14 /var/www/html/app/protected/modules/zurmo/utils/ZurmoControllerUtil.php(109): ZurmoControllerUtil->saveModelFromSanitizedData(Array, Object(Role), false, 'Philippines Des...', false)
#15 /var/www/html/app/protected/modules/zurmo/components/ZurmoBaseController.php(738): ZurmoControllerUtil->saveModelFromPost(Array, Object(Role), false, 'Philippines Des...', false)
#16 /var/www/html/app/protected/modules/zurmo/controllers/RoleController.php(99): ZurmoBaseController->attemptToSaveModelFromPost(Object(Role))
#17 /var/www/html/app/protected/modules/zurmo/controllers/RoleController.php(74): ZurmoRoleController->actionEdit('4')
#18 [internal function]: ZurmoRoleController->actionDetails('4')
#19 /var/www/html/yii/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(Object(ZurmoRoleController), Array)
#20 /var/www/html/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(Object(ZurmoRoleController), Object(ReflectionMethod), Array)
#21 /var/www/html/yii/framework/web/CController.php(308): CInlineAction->runWithParams(Array)
#22 /var/www/html/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(Object(CInlineAction))
#23 /var/www/html/yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
#24 /var/www/html/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(Object(CFilterChain))
#25 /var/www/html/yii/framework/web/CController.php(291): CFilterChain->run()
#26 /var/www/html/yii/framework/web/CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
#27 /var/www/html/yii/framework/web/CWebApplication.php(286): CController->run('details')
#28 /var/www/html/yii/framework/web/CWebApplication.php(141): CWebApplication->runController('zurmo/role/deta...')
#29 /var/www/html/yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#30 /var/www/html/app/protected/core/components/WebApplication.php(88): CApplication->run()
#31 /var/www/html/app/index.php(75): WebApplication->run()
#32 {main}
What can be done to resolve this? I feel like it's somehow related to the database's configuration, but I don't know what to look at for it.
count may be a 'reserved' element.
SHOW CREATE TABLE table_name may have some details about the data types that are critical.
Search in SO for SQLSTATE 22003 and you will find many previous experiences and many with resolutions that resolved the error message.
I'm having an issue with the search filter, for some reason when I select the filters, I get a page with error codes all over:
There has been an error processing your request
You cannot define a correlation name color_idx more than once
Trace:
#0 /home/oembarga/public_html/lib/Varien/Db/Select.php(281): Zend_Db_Select->_join('inner join', Array, 'color_idx.entit...',
Array, NULL)
#1 /home/oembarga/public_html/lib/Zend/Db/Select.php(336): Varien_Db_Select->_join('inner join', Array, 'color_idx.entit...',
Array, NULL)
#2 /home/oembarga/public_html/lib/Zend/Db/Select.php(315): Zend_Db_Select->joinInner(Array, 'color_idx.entit...', Array, NULL)
#3 /home/oembarga/public_html/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php(70):
Zend_Db_Select->join(Array, 'color_idx.entit...', Array)
#4 /home/oembarga/public_html/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php(94): Mage_Catalog_Model_Resource_Layer_Filter_Attribute->applyFilterToCollection(Object(Mage_Catalog_Model_Layer_Filter_Attribute),
'56')
#5 /home/oembarga/public_html/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(91):
Mage_Catalog_Model_Layer_Filter_Attribute->apply(Object(Mage_Core_Controller_Request_Http),
Object(Mage_Catalog_Block_Layer_Filter_Attribute))
#6 /home/oembarga/public_html/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(73):
Mage_Catalog_Block_Layer_Filter_Abstract->_initFilter()
#7 /home/oembarga/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(136):
Mage_Catalog_Block_Layer_Filter_Abstract->init()
#8 /home/oembarga/public_html/app/code/core/Mage/Core/Block/Abstract.php(293):
Mage_Catalog_Block_Layer_View->_prepareLayout()
#9 /home/oembarga/public_html/app/code/core/Mage/Core/Model/Layout.php(456):
Mage_Core_Block_Abstract->setLayout(Object(Codnitive_Extifcon_Model_Core_Layout))
#10 /home/oembarga/public_html/app/code/core/Mage/Core/Model/Layout.php(472):
Mage_Core_Model_Layout->createBlock('catalog/layer_v...',
'catalog.leftnav')
#11 /home/oembarga/public_html/app/code/core/Mage/Core/Model/Layout.php(239):
Mage_Core_Model_Layout->addBlock('catalog/layer_v...',
'catalog.leftnav')
#12 /home/oembarga/public_html/app/code/core/Mage/Core/Model/Layout.php(205):
Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element),
Object(Mage_Core_Model_Layout_Element))
#13 /home/oembarga/public_html/app/code/core/Mage/Core/Model/Layout.php(210):
Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#14 /home/oembarga/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344):
Mage_Core_Model_Layout->generateBlocks()
#15 /home/oembarga/public_html/app/code/core/Mage/Cms/Helper/Page.php(113):
Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#16 /home/oembarga/public_html/app/code/core/Mage/Cms/Helper/Page.php(52):
Mage_Cms_Helper_Page->_renderPage(Object(Unirgy_DropshipMicrositePro_IndexController),
'default-microsi...')
#17 /home/oembarga/public_html/app/code/community/Unirgy/DropshipMicrositePro/controllers/IndexController.php(33):
Mage_Cms_Helper_Page->renderPage(Object(Unirgy_DropshipMicrositePro_IndexController), 'default-microsi...')
#18 /home/oembarga/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418):
Unirgy_DropshipMicrositePro_IndexController->landingPageAction()
#19 /home/oembarga/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250):
Mage_Core_Controller_Varien_Action->dispatch('landingPage')
#20 /home/oembarga/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172):
Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#21 /home/oembarga/public_html/app/code/core/Mage/Core/Model/App.php(354):
Mage_Core_Controller_Varien_Front->dispatch()
#22 /home/oembarga/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#23 /home/oembarga/public_html/index.php(88): Mage::run('', 'store')
#24 {main}
Here is what I get and I don't know what to do....
There has been an error processing your request
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
Trace:
#0 /home/autobadges/public_html/stangcenter.com/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/autobadges/public_html/stangcenter.com/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/autobadges/public_html/stangcenter.com/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#3 /home/autobadges/public_html/stangcenter.com/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#4 /home/autobadges/public_html/stangcenter.com/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/autobadges/public_html/stangcenter.com/lib/Varien/Data/Collection/Db.php(783): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#6 /home/autobadges/public_html/stangcenter.com/lib/Varien/Data/Collection/Db.php(696): Varien_Data_Collection_Db->_fetchAll(Object(Varien_Db_Select))
#7 /home/autobadges/public_html/stangcenter.com/lib/Varien/Data/Collection/Db.php(617): Varien_Data_Collection_Db->getData()
#8 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(57): Varien_Data_Collection_Db->load()
#9 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Block/Abstract.php(223): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#10 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#11 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#12 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#13 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#14 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#15 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Controller/Varien/Action.php(343): Mage_Core_Model_Layout->generateBlocks()
#16 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Controller/Varien/Action.php(270): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#17 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Adminhtml/Controller/Action.php(263): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#18 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(246): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#19 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->editAction()
#20 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(253): Mage_Core_Controller_Varien_Action->dispatch('edit')
#21 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#22 /home/autobadges/public_html/stangcenter.com/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Controller_Varien_Front->dispatch()
#23 /home/autobadges/public_html/stangcenter.com/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#24 /home/autobadges/public_html/stangcenter.com/index.php(80): Mage::run('', 'store')
#25 {main}
write your zend query in a try block
and
catch the exception
Zend_Db_Statement_Mysqli_Exception (check which one you are using 'mysql' or 'mysqli' or 'PDO') in the exception catch code just call {model}->getDefaultAdapter()->closeConnection() and then again call the zend query you have got.
this should solve your problem.
NOTE: Below code is just for reference and should not be used as it is (may have error in it).
try
{
$user = {model}->fetchRow(array('user_id = ?' => $senderid));
}
catch(Zend_Db_Statement_Mysqli_Exception $zenddbmysqliexc)
{
if(stristr($zenddbmysqliexc->getMessage(), 'MySQL server has gone away'))
{
{model}->getDefaultAdapter()->closeConnection();
$user = {model}->fetchRow(array('user_id = ?' => $senderid));
}
}