JacobD 3 Posted January 10, 2019 Report Share Posted January 10, 2019 Here is the error I get on every page every module other than the admin page: Stack trace: PHP warning in /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/util/EncryptUtil.php(168) #0 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/util/EncryptUtil.php(168): openssl_decrypt() #1 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/JSONEmbeddedModelFieldsBehavior.php(258): EncryptUtil->decrypt() #2 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/TransformedFieldStorageBehavior.php(106): JSONEmbeddedModelFieldsBehavior->unpackAttribute() #3 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/behaviors/TransformedFieldStorageBehavior.php(119): JSONEmbeddedModelFieldsBehavior->unpackAll() #4 /home/altitude/www/crm/X2CRM-master/x2engine/framework/base/CComponent.php(561): JSONEmbeddedModelFieldsBehavior->afterFind() #5 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(902): Credentials->raiseEvent() #6 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1040): Credentials->onAfterFind() #7 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1874): Credentials->afterFind() #8 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1359): Credentials->populateRecord() #9 /home/altitude/www/crm/X2CRM-master/x2engine/framework/db/ar/CActiveRecord.php(1494): Credentials->query() #10 /home/altitude/www/crm/X2CRM-master/x2engine/protected/models/Admin.php(87): Credentials->findByPk() #11 /home/altitude/www/crm/X2CRM-master/x2engine/protected/models/Admin.php(129): Admin->getGoogleIntegrationCredentials() #12 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/X2ClientScript.php(957): Admin->getGoogleApiKey() #13 /home/altitude/www/crm/X2CRM-master/x2engine/protected/views/profile/_activityFeed.php(278): X2ClientScript->registerGeolocationScript() #14 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(126): require() #15 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(95): ProfileController->renderInternal() #16 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(872): ProfileController->renderFile() #17 /home/altitude/www/crm/X2CRM-master/x2engine/protected/views/profile/activity.php(65): ProfileController->renderPartial() #18 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(126): require() #19 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CBaseController.php(95): ProfileController->renderInternal() #20 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(872): ProfileController->renderFile() #21 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(730): ProfileController->renderPartial() #22 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/ProfileController.php(1624): ProfileController->render() #23 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/actions/CInlineAction.php(49): ProfileController->actionActivity() #24 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(308): CInlineAction->runWithParams() #25 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(134): ProfileController->runAction() #26 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(580): CFilterChain->run() #27 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets() #28 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter() #29 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run() #30 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(1148): CAccessControlFilter->filter() #31 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterAccessControl() #32 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter() #33 /home/altitude/www/crm/X2CRM-master/x2engine/protected/controllers/x2base.php(580): CFilterChain->run() #34 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets() #35 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter() #36 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run() #37 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter() #38 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilter.php(40): CFilterChain->run() #39 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter() #40 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(291): CFilterChain->run() #41 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CController.php(265): ProfileController->runActionWithFilters() #42 /home/altitude/www/crm/X2CRM-master/x2engine/framework/web/CWebApplication.php(282): ProfileController->run() #43 /home/altitude/www/crm/X2CRM-master/x2engine/protected/components/X2WebApplication.php(64): X2WebApplication->runController() #44 /home/altitude/www/crm/X2CRM-master/x2engine/framework/base/CApplication.php(185): X2WebApplication->processRequest() #45 /home/altitude/www/crm/X2CRM-master/x2engine/index.php(66): X2WebApplication->run() I already tried updating to PHP7.1 and 7.2 and no luck still. Quote Link to post Share on other sites
X2Peter 45 Posted January 10, 2019 Report Share Posted January 10, 2019 Hello JacobD, You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup). 2 Quote Link to post Share on other sites
JacobD 3 Posted January 10, 2019 Author Report Share Posted January 10, 2019 Hello JacobD, You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup). This worked. Thank you! 1 Quote Link to post Share on other sites
alt_f4 57 Posted January 11, 2019 Report Share Posted January 11, 2019 Same here but thanks to X2Peter, now it works. 1 Quote Link to post Share on other sites
Attila 30 Posted January 13, 2019 Report Share Posted January 13, 2019 fixed Quote Link to post Share on other sites
alt_f4 57 Posted January 14, 2019 Report Share Posted January 14, 2019 PDO is a PHP extension - sure, that this is installed and usable? Tried a server restart (I´d to do this, for example). May your DB-port is a non-standard-port? You´re able to configure your connection settings around line 217 in "protected/config/main.php ".Also you may want to check your "php.ini" for the path to the PDO/PHP extentions (they might be changed to a PHP upgrade). Regards! 1 Quote Link to post Share on other sites
Attila 30 Posted January 14, 2019 Report Share Posted January 14, 2019 thanks Michael It's a very standard install standard ports etc .. I have read that this could occur if one has multiple Php version installed I will scratch some more Any other pearls of wisdom are welcome Best Quote Link to post Share on other sites
Attila 30 Posted January 16, 2019 Report Share Posted January 16, 2019 Silly Me it was missing the PDO and MySQL drivers for for 7.2 - Quote Link to post Share on other sites
alt_f4 57 Posted January 23, 2019 Report Share Posted January 23, 2019 Glad to hear Quote Link to post Share on other sites
Metalyinsane 0 Posted January 25, 2019 Report Share Posted January 25, 2019 Hello All, New to x2crm, its been a long road getting my web server configured but I managed to get it running on V6.6 - update to V7.1 now getting same error but the above mentioned has not worked. Tried to manual execute mydomain.com.au/public_html/x2crm/protected/yiic.php This returned an error, any help on this one? Error 404Unable to resolve the request "public_html/x2crm/protected/yiic.php". You have made an invalid request, please do not repeat this.Error 500It looks like the application ran into an unexpected error. We apologize for the inconvenience and would like to do our best to fix this issue. If you would like to make a post on our forums we can actively interact with you in getting this resolved. If not, simply sending the error report helps us immensely and will only improve the quality of the software. Thanks!Send Error ReportHere's a quick list of what will be included in the report:Error Code: 500Error Message: count(): Parameter must be an array or an object that implements CountableStack Trace: [click to toggle display]PHP warning in /home/aspirete/public_html/x2crm/protected/components/TagCloud.php(55)#0 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(170): TagCloud->run()#1 /home/aspirete/public_html/x2crm/protected/components/SortableWidgets.php(163): SortableWidgets->widget()#2 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(833): SortableWidgets->run()#3 /home/aspirete/public_html/x2crm/protected/views/layouts/column3.php(104): ProfileController->widget()#4 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(126): require()#5 /home/aspirete/public_html/x2crm/framework/web/CBaseController.php(95): ProfileController->renderInternal()#6 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(716): ProfileController->renderFile()#7 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(735): ProfileController->renderLayout()#8 /home/aspirete/public_html/x2crm/protected/controllers/ProfileController.php(1686): ProfileController->render()#9 unknown(0): ProfileController->actionView()#10 /home/aspirete/public_html/x2crm/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()#11 /home/aspirete/public_html/x2crm/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()#12 /home/aspirete/public_html/x2crm/framework/web/CController.php(308): CInlineAction->runWithParams()#13 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(134): ProfileController->runAction()#14 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(581): CFilterChain->run()#15 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()#16 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()#17 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()#18 /home/aspirete/public_html/x2crm/framework/web/CController.php(1148): CAccessControlFilter->filter()#19 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterAccessControl()#20 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()#21 /home/aspirete/public_html/x2crm/protected/controllers/x2base.php(581): CFilterChain->run()#22 /home/aspirete/public_html/x2crm/framework/web/filters/CInlineFilter.php(58): ProfileController->filterSetPortlets()#23 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()#24 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()#25 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()#26 /home/aspirete/public_html/x2crm/framework/web/filters/CFilter.php(40): CFilterChain->run()#27 /home/aspirete/public_html/x2crm/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()#28 /home/aspirete/public_html/x2crm/framework/web/CController.php(291): CFilterChain->run()#29 /home/aspirete/public_html/x2crm/framework/web/CController.php(265): ProfileController->runActionWithFilters()#30 /home/aspirete/public_html/x2crm/framework/web/CWebApplication.php(282): ProfileController->run()#31 /home/aspirete/public_html/x2crm/protected/components/X2WebApplication.php(65): X2WebApplication->runController()#32 /home/aspirete/public_html/x2crm/framework/base/CApplication.php(185): X2WebApplication->processRequest()#33 /home/aspirete/public_html/x2crm/index.php(67): X2WebApplication->run()X2Engine Version: 7.1PHP Version: 7.2.14Email Address (optional)Include phpinfo()? (optional, but recommended) Please Note: Any information in the $_GET or $_POST arrays included with the request will also be sent with the report. Quote Link to post Share on other sites
Metalyinsane 0 Posted January 25, 2019 Report Share Posted January 25, 2019 Hello All, Found the fix the my question - Went back to PHP 7.1 Quote Link to post Share on other sites
X2Peter 45 Posted January 26, 2019 Report Share Posted January 26, 2019 Hello Metalyinsane, Is this a fresh install or did you update from an earlier version? Quote Link to post Share on other sites
Craig Donovan 1 Posted January 27, 2019 Report Share Posted January 27, 2019 I have the same error on PHP v7.2 Craig Quote Link to post Share on other sites
X2Peter 45 Posted January 28, 2019 Report Share Posted January 28, 2019 This appears to be caused by a null variable ($hiddenTags) within protected/components/TagCloud.php. We will provide a hotfix patch this week. You can also replace: if(count($hiddenTags)>0){ $tagParams = AuxLib::bindArray ($hiddenTags); $params = array_merge ($params, $tagParams); $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")"; }else{ $str1=""; } to: if(!is_null($hiddenTags) && count($hiddenTags)>0){ $tagParams = AuxLib::bindArray ($hiddenTags); $params = array_merge ($params, $tagParams); $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")"; }else{ $str1=""; } in protected/components/TagCloud.php 1 Quote Link to post Share on other sites
Craig Donovan 1 Posted January 29, 2019 Report Share Posted January 29, 2019 Thanks Peter - this worked well. No further issues. Kind regards Craig Quote Link to post Share on other sites
Metalyinsane 0 Posted January 29, 2019 Report Share Posted January 29, 2019 Hello Metalyinsane, Is this a fresh install or did you update from an earlier version? Installed V6.6 then with no data upgraded straight to V7.1 Quote Link to post Share on other sites
dale 0 Posted March 6, 2019 Report Share Posted March 6, 2019 Hello JacobD, You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup). On my setup the encryption key files didn't autogenerate. There is no yiic in protected - it's back a directory. I see cryptsetup.php in protected commands. How to? Quote Link to post Share on other sites
dale 0 Posted March 7, 2019 Report Share Posted March 7, 2019 Tried running the command from Plesk's scheduled task but coming up with an error. CException: Failed to create a secure encryption key. The error message was: Key file's containing directory at config not found. in /..../httpdocs/x2/protected/commands/CryptSetupCommand.php:67Stack trace:#0 /.../httpdocs/x2/framework/console/CConsoleCommandRunner.php(71): CryptSetupCommand->run(Array)#1 /.../httpdocs/x2/framework/console/CConsoleApplication.php(92): CConsoleCommandRunner->run(Array)#2 /.../httpdocs/x2/framework/base/CApplication.php(185): CConsoleApplication->processRequest()#3 /.../httpdocs/x2/framework/yiic.php(33): CApplication->run()#4 /.../httpdocs/x2/protected/yiic.php(8): require_once('/var/www/vhosts...')#5 {main} Quote Link to post Share on other sites
Attila 30 Posted March 7, 2019 Report Share Posted March 7, 2019 mine does the same Quote Link to post Share on other sites
dale 0 Posted March 7, 2019 Report Share Posted March 7, 2019 Any ideas on how to fix? Permission or path problem? Email is broken. Quote Link to post Share on other sites
ylandsman 3 Posted May 29, 2019 Report Share Posted May 29, 2019 This appears to be caused by a null variable ($hiddenTags) within protected/components/TagCloud.php. We will provide a hotfix patch this week. You can also replace: if(count($hiddenTags)>0){ $tagParams = AuxLib::bindArray ($hiddenTags); $params = array_merge ($params, $tagParams); $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")"; }else{ $str1=""; } to: if(!is_null($hiddenTags) && count($hiddenTags)>0){ $tagParams = AuxLib::bindArray ($hiddenTags); $params = array_merge ($params, $tagParams); $str1=" AND tag NOT IN (".implode (',', array_keys ($tagParams)).")"; }else{ $str1=""; } in protected/components/TagCloud.php Was this hot fix ever released? If so, I need some clarity on getting the hot fixes as they are released. In the meantime I am patching manually, and resolving issues myself as I find them. Thanks Quote Link to post Share on other sites
jusza 0 Posted June 27, 2019 Report Share Posted June 27, 2019 Hello JacobD, You may need to re-generate your encryption.iv and encryption.key files in protected/config. You can do this by deleting these files (the app should then re-create them or you can manually create them by running protected/yiic cryptsetup).This worked for me too. Thanks. Quote Link to post Share on other sites
X2Peter 45 Posted June 27, 2019 Report Share Posted June 27, 2019 Any ideas on how to fix? Permission or path problem? Email is broken. Your config directory may not have the proper permissions. Can you verify that the directory exists, that it has web-server write permissions and that the following files exist in that directory: encryption.iv encryption.key Quote Link to post Share on other sites
steals 6 Posted August 25, 2020 Report Share Posted August 25, 2020 Can not update... Fresh install php 7.4 7.1 to 8.0 Exception: "CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away" in /home/nevulosa/public_html/doncasas.com/x2/framework/db/CDbCommand.php L543 Quote Link to post Share on other sites
Charl Beetge 2 Posted July 20, 2021 Report Share Posted July 20, 2021 My email credentials are not encrypted and I cannot get the system to create the encryption.iv and encryption.key files. I deleted them as mentioned, they are not created automaticaley when I re-create the email credentials or start the app; and I checked the config directory permissions. I can also not get the app to create them manually by running protected/yiic, I get a "You don't have permission to access this resource." error. Anybody with advice on how to resolve the matter and get the email credentials encrypted? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.