Community

Forums » SEPHP Help and Tips

Signup Failing with Mysqli Error

    • 7 posts
    October 5, 2019 10:00 PM EDT

    Hello, I've recently started moving my website over to a new host. I did a fresh install of 4.10.5 and moved over all the photos etc and relevant database tables. It's working great so far, but when I did a test sign-up, I ran into this at the very end:

    2019-10-05T21:14:48+00:00 CRIT (2): Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'default' in 'where clause' in /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Statement/Mysqli.php:77 Stack trace: #0 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT `engine4...') #1 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT `engine4...') #2 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT `engine4...') #3 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Select.php(711): Zend_Db_Adapter_Abstract->query('SELECT `engine4...') #4 /var/www/clients/client1/web1/web/application/modules/Core/Model/DbTable/MailTemplates.php(52): Zend_Db_Select->query() #5 /var/www/clients/client1/web1/web/application/modules/User/Plugin/Core.php(193): Core_Model_DbTable_MailTemplates->getDefaultEmails() #6 /var/www/clients/client1/web1/web/application/libraries/Engine/Hooks/Dispatcher.php(224): User_Plugin_Core->onUserCreateAfter(Object(Engine_Hooks_Event)) #7 /var/www/clients/client1/web1/web/application/modules/Core/Model/Item/Abstract.php(504): Engine_Hooks_Dispatcher->callEvent('onUserCreateAft...', Object(Engine_Hooks_Event)) #8 /var/www/clients/client1/web1/web/application/modules/User/Model/User.php(324): Core_Model_Item_Abstract->_postInsert() #9 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Table/Row/Abstract.php(492): User_Model_User->_postInsert() #10 /var/www/clients/client1/web1/web/application/libraries/Zend/Db/Table/Row/Abstract.php(438): Zend_Db_Table_Row_Abstract->_doInsert() #11 /var/www/clients/client1/web1/web/application/modules/User/Plugin/Signup/Account.php(197): Zend_Db_Table_Row_Abstract->save() #12 /var/www/clients/client1/web1/web/application/modules/Core/Controller/Action/Helper/FormSequence.php(193): User_Plugin_Signup_Account->onProcess() #13 /var/www/clients/client1/web1/web/application/modules/Core/Controller/Action/Helper/FormSequence.php(45): Core_Controller_Action_Helper_FormSequence->doProcess() #14 /var/www/clients/client1/web1/web/application/libraries/Zend/Controller/Action/HelperBroker.php(328): Core_Controller_Action_Helper_FormSequence->direct() #15 /var/www/clients/client1/web1/web/application/modules/User/controllers/SignupController.php(51): Zend_Controller_Action_HelperBroker->__call('formSequence', Array) #16 /var/www/clients/client1/web1/web/application/libraries/Zend/Controller/Action.php(516): User_SignupController->indexAction() #17 /var/www/clients/client1/web1/web/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('indexAction') #18 /var/www/clients/client1/web1/web/application/libraries/Zend/View/Helper/Action.php(135): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #19 /var/www/clients/client1/web1/web/application/libraries/Zend/View/Abstract.php(349): Zend_View_Helper_Action->action('index', 'signup', 'user', Array) #20 /var/www/clients/client1/web1/web/application/modules/User/widgets/login-or-signup-popup/index.tpl(23): Zend_View_Abstract->__call('action', Array) #21 /var/www/clients/client1/web1/web/application/libraries/Zend/View.php(157): include('/var/www/client...') #22 /var/www/clients/client1/web1/web/application/libraries/Zend/View/Abstract.php(888): Zend_View->_run('/var/www/client...') #23 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Widget/Abstract.php(292): Zend_View_Abstract->render(NULL) #24 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Widget/Abstract.php(258): Engine_Content_Widget_Abstract->renderScript() #25 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Element/Widget.php(73): Engine_Content_Widget_Abstract->render('index') #26 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Element/Abstract.php(583): Engine_Content_Element_Widget->_render() #27 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Decorator/Children.php(31): Engine_Content_Element_Abstract->render() #28 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Element/Abstract.php(594): Engine_Content_Decorator_Children->render('') #29 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Decorator/Children.php(31): Engine_Content_Element_Abstract->render() #30 /var/www/clients/client1/web1/web/application/libraries/Engine/Content/Element/Abstract.php(594): Engine_Content_Decorator_Children->render('') #31 /var/www/clients/client1/web1/web/application/libraries/Engine/Content.php(219): Engine_Content_Element_Abstract->render() #32 /var/www/clients/client1/web1/web/application/libraries/Engine/View/Helper/Content.php(47): Engine_Content->render('footer') #33 /var/www/clients/client1/web1/web/application/libraries/Zend/View/Abstract.php(349): Engine_View_Helper_Content->content('footer') #34 /var/www/clients/client1/web1/web/application/modules/Core/layouts/scripts/default.tpl(16): Zend_View_Abstract->__call('content', Array) #35 /var/www/clients/client1/web1/web/application/libraries/Zend/View.php(157): include('/var/www/client...') #36 /var/www/clients/client1/web1/web/application/libraries/Zend/View/Abstract.php(888): Zend_View->_run('/var/www/client...') #37 /var/www/clients/client1/web1/web/application/libraries/Zend/Layout.php(796): Zend_View_Abstract->render(NULL) #38 /var/www/clients/client1/web1/web/application/libraries/Zend/Layout/Controller/Plugin/Layout.php(143): Zend_Layout->render() #39 /var/www/clients/client1/web1/web/application/libraries/Zend/Controller/Plugin/Broker.php(333): Zend_Layout_Controller_Plugin_Layout->postDispatch(Object(Zend_Controller_Request_Http)) #40 /var/www/clients/client1/web1/web/application/libraries/Zend/Controller/Front.php(965): Zend_Controller_Plugin_Broker->postDispatch(Object(Zend_Controller_Request_Http)) #41 /var/www/clients/client1/web1/web/application/modules/Core/Bootstrap.php(84): Zend_Controller_Front->dispatch() #42 /var/www/clients/client1/web1/web/application/libraries/Engine/Application.php(160): Core_Bootstrap->run() #43 /var/www/clients/client1/web1/web/application/index.php(223): Engine_Application->run() #44 /var/www/clients/client1/web1/web/boot.php(47): include('/var/www/client...') #45 /var/www/clients/client1/web1/web/index.php(24): Engine_Boot->boot() #46 {main}

     

    Did I perhaps miss something when I was copying over the database tables?

     

     

    • 3739 posts
    October 6, 2019 5:14 AM EDT

    You should not do a fresh install and then migrate the database from an old install. Please migrate the full site over to the new host, and then if you want to be on current version please upgrade the site. There are too many dependent tables to do it the way you are doing it without issues. Most hosts offer free migration. I know our recommended host does. Please also note that you can't have the site live on the old host and on the new host unless you have two licenses.

    • 7 posts
    October 6, 2019 6:42 AM EDT

    Right. They're both locked and it's just an IP address on the new host until it's complete to comply with the rules I saw on the moving page (if I read them correctly).

    I was hoping I could do it with a clean install as a lot of things weren't working right anymore with the old install as it was. I wasn't seeing the feed in admin panel, announcements weren't showing up, and a lot of junk from modules I didn't need anymore as a few examples.

    • 7 posts
    October 6, 2019 7:31 AM EDT

    Ack! I found the issue. engine4_core_mailtemplates was missing the default column. I added that column with the exact specs as in a default install and that fixed it. Thank you for your reply Donna, you are so helpful. I certainly would not ever do it this way again. I can't wait to change the DNS so I can cancel my old hosting.

    I did this exactly to solve my issue.

    ALTER TABLE `engine4_core_mailtemplates` ADD `default` TINYINT(1) NOT NULL DEFAULT '1' AFTER `vars`;

    Certainly not something I would have had to do if I'd done it the way you recommend. My own fault lol

     

    • 3739 posts
    October 6, 2019 9:05 AM EDT

    Awesome that you found the issue! Thank you for posting your solution. I hope everything works out for you.  :)

    • 7 posts
    October 6, 2019 9:26 AM EDT

    Thank you so much. :) After changing the DNS for the domain it all seems to be working smoothly. I'm so glad to be using socialengine.

    • 3739 posts
    October 7, 2019 5:20 AM EDT

    We're glad you are using SE too and part of our community :)