Database error after nightly cron

I'm getting the following error in both 71.B1 and B2 now after my nightly cron.

Database error in neoRiche

Query:

SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) %  = 0

Mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1

Found error in the file '/home/neoriche.com/periodic/cron.php(120) : eval()'d code' at line 1.
Called 'getAll' function with erroneous argument #0.

Quote · 6 Dec 2012

Hello??  Anyone ... Andrew ... Need some support here...

Quote · 6 Dec 2012

One of the cron jobs in the sys_cron_jobs table must be damaged. But from that error there is no way to tell which one.

Cron jobs are also cached, so i would start with that. Clear the cache. A manual clear would be best to ensure it is really cleared.


https://www.deanbassett.com
Quote · 6 Dec 2012

Thank you Deano for the info - I do appreciate it very much, you are one of the most helpful members on Boonex.  I did clear all the caches both via Boonex and manually - but sorry to say did not help the error. It does not seam to be hurting my site. But your comment that something might be "damaged" scares the heck out of me. Any other ideas on how to correct this would be greatly appreciated. Thanks again Dean for your help.

One of the cron jobs in the sys_cron_jobs table must be damaged. But from that error there is no way to tell which one.

Cron jobs are also cached, so i would start with that. Clear the cache. A manual clear would be best to ensure it is really cleared.


 

Quote · 6 Dec 2012

All right, i will not longer use the word "Damaged" But if that word scares you, then perhaps you should get out of the world of computers because things happen, and that is why the computer world invented a thing called backups which sadly to say most people don't do.

Anyhow. The error is not much to go on, so i am just guessing here. Guessing is all i can do at this point.

The error is dealing with the profiles. So now my next question would be.. Have you changed, removed or altered in anyway any of the profile fields.

https://www.deanbassett.com
Quote · 6 Dec 2012

 Wow your having a bad day. I've been in this business for over 25 years and when someone uses the word "damaged" your years of experience tells you that something is really wrong and that it needs to be addressed(telling someone to get out of a 25 year profession due to a concern of the software they are using is not a positive statement for that software). And I have several back-ups.  But that does not complete the process of fixing the problem. And NO I've not done anything to the profile fields.

All right, i will not longer use the word "Damaged" But if that word scares you, then perhaps you should get out of the world of computers because things happen, and that is why the computer world invented a thing called backups which sadly to say most people don't do.

Anyhow. The error is not much to go on, so i am just guessing here. Guessing is all i can do at this point.

The error is dealing with the profiles. So now my next question would be.. Have you changed, removed or altered in anyway any of the profile fields.

 

Quote · 6 Dec 2012

Is this the full error that you are receiving via email? Also, check the profiles table and see what collation it is.

Nothing to see here
Quote · 6 Dec 2012

 Do you mean the sys_profile_fields in mysql? And the error has a very long debug trace.

Is this the full error that you are receiving via email? Also, check the profiles table and see what collation it is.

 

Quote · 6 Dec 2012

I am pretty sure he means Profiles table.

https://www.deanbassett.com
Quote · 6 Dec 2012

 

I am pretty sure he means Profiles table.

 Yes I meant the profiles table.

Nothing to see here
Quote · 7 Dec 2012

 

Is this the full error that you are receiving via email? Also, check the profiles table and see what collation it is.

 Here is the full error:

Database error in neoRiche

Query:

SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) %  = 0

Mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1

Found error in the file '/home/myprivatesites/neoriche.com/periodic/cron.php(120) : eval()'d code' at line 1.
Called 'getAll' function with erroneous argument #0.


Debug backtrace:

Array
(
    [1] => Array
        (
            [file] => /home/xxxxxxxxxxxxxxxxxxxxxxx/neoriche.com/inc/classes/BxDolDb.php
            [line] => 237
            [function] => error
            [class] => BxDolDb
            [type] => ->
            [object] => BxDolDb Object
                (
                    [error_checking] => 1
                    [error_message] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1
                    [host] => local.xxxxxxxxxxxx <-edited out so no one screws with site>
                    [port] => 
                    [socket] => 
                    [dbname] => xxxxxxxxxxxxx <-edited out so no one screws with site>
                    [user] => *****
                    [password] => *****
                    [link] => Resource id #30
                    [current_res] => 
                    [current_arr_type] => 1
                    [oParams] => BxDolParams Object
                        (
                            [_oDb] => BxDolDb Object
 *RECURSION*
                            [_oCache] => BxDolCacheFile Object
                                (
                                    [sPath] => /home/xxxxxxxxxxxxx/neoriche.com/cache/
                                )

                            [_sCacheFile] => sys_options_edf36711fb751f481a287a9379590e8a.php
                            [_aParams] => [truncated]
                        )

                    [oDbCacheObject] => BxDolCacheFile Object
                        (
                            [sPath] => /home/xxxxxxxxxxxxxxx/neoriche.com/cache/
                        )

                )

            [args] => Array
                (
                    [0] => Database query error
                    [1] => 
                    [2] => SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) %  = 0
                )

        )

    [2] => Array
        (
            [file] => /home/xxxxxxxxxxxxxxxxx/neoriche.com/inc/classes/BxDolDb.php
            [line] => 252
            [function] => res
            [class] => BxDolDb
            [type] => ->
            [object] => BxDolDb Object
                (
                    [error_checking] => 1
                    [error_message] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1
                    [host] => xxxxxxxxxxxxxx
                    [port] => 
                    [socket] => 
                    [dbname] => xxxxxxxxxxxxxxx
                    [user] => *****
                    [password] => *****
                    [link] => Resource id #30
                    [current_res] => 
                    [current_arr_type] => 1
                    [oParams] => BxDolParams Object
                        (
                            [_oDb] => BxDolDb Object
 *RECURSION*
                            [_oCache] => BxDolCacheFile Object
                                (
                                    [sPath] => /home/xxxxxxxxxxxxxxxxxx/neoriche.com/cache/
                                )

                            [_sCacheFile] => sys_options_edf36711fb751f481a287a9379590e8a.php
                            [_aParams] => [truncated]
                        )

                    [oDbCacheObject] => BxDolCacheFile Object
                        (
                            [sPath] => /home/xxxxxxxxxxxxxxxxxx/neoriche.com/cache/
                        )

                )

            [args] => Array
                (
                    [0] => SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) %  = 0
                )

        )

    [3] => Array
        (
            [file] => /home/xxxxxxxxxxxxxxxxxxxx/neoriche.com/periodic/cron.php(120) : eval()'d code
            [line] => 1
            [function] => getAll
            [class] => BxDolDb
            [type] => ->
            [object] => BxDolDb Object
                (
                    [error_checking] => 1
                    [error_message] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 0' at line 1
                    [host] => xxxxxxxxxxxxxxxxxxxxxx
                    [port] => 
                    [socket] => 
                    [dbname] => xxxxxxxxxxxxx
                    [user] => *****
                    [password] => *****
                    [link] => Resource id #30
                    [current_res] => 
                    [current_arr_type] => 1
                    [oParams] => BxDolParams Object
                        (
                            [_oDb] => BxDolDb Object
 *RECURSION*
                            [_oCache] => BxDolCacheFile Object
                                (
                                    [sPath] => /home/xxxxxxxxxxxxxxx/neoriche.com/cache/
                                )

                            [_sCacheFile] => sys_options_edf36711fb751f481a287a9379590e8a.php
                            [_aParams] => [truncated]
                        )

                    [oDbCacheObject] => BxDolCacheFile Object
                        (
                            [sPath] => /home/xxxxxxxxxxxxxxxxx/neoriche.com/cache/
                        )

                )

            [args] => Array
                (
                    [0] => SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) %  = 0
                )

        )

    [4] => Array
        (
            [file] => /home/xxxxxxxxxxxxxxxxx/neoriche.com/periodic/cron.php
            [line] => 120
            [function] => eval
        )

    [5] => Array
        (
            [file] => /home/xxxxxxxxxxxxxxxxxxxx/neoriche.com/periodic/cron.php
            [line] => 131
            [function] => runJob
            [args] => Array
                (
                    [0] => Array
                        (
                            [id] => 12
                            [name] => auto_conf_emails
                            [time] => 0 1 * * *
                            [class] => 
                            [file] => 
                            [eval] => $iPeriod = $GLOBALS['MySQL']->getParam('confirmation_email_period'); $aProfilesToConfirm = $GLOBALS['MySQL']->getAll("SELECT `ID` FROM `Profiles` WHERE `Status` = 'Unconfirmed' AND (`Couple`=0 OR `Couple` > `ID`) AND (TO_DAYS(NOW()) - TO_DAYS(`DateReg`)) % {$iPeriod} = 0"); foreach ($aProfilesToConfirm as $aProfile) activation_mail($aProfile['ID'], 0);
                        )

                )

        )

)
 
Quote · 7 Dec 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.