Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Error Log File Is Increasing Rapidly Rate Topic   - - - - -

 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 11 March 2018 - 04:58 AM #1

Hi my error log file is getting filled with the below line. can you please advice needs to be fixed?

 

PHP Notice: Use of undefined constant DESCR_SL - assumed 'DESCR_SL' in /home/xxxx/public_html/app/functions/fn.companies.php on line 390

 
 
Thanks in advance


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 11 March 2018 - 06:05 PM #2

You have something seriously wrong since DESCR_SL is defined in the init process.  Would require investigation on your server.

Are there other errors that might point more to the source?  I.e. "Notice undefined index XYZ...." or similar.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17368 posts

Posted 12 March 2018 - 07:08 AM #3

I suggest you to disable 3rd party modules and check. If the issue still exists, please contact CS-Cart support team


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 12 March 2018 - 07:12 AM #4

You have something seriously wrong since DESCR_SL is defined in the init process.  Would require investigation on your server.

Are there other errors that might point more to the source?  I.e. "Notice undefined index XYZ...." or similar.

Actually besides this warning there is no other error in the log file. The entire log file is just this one PHP notice



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 12 March 2018 - 07:54 PM #5

Then you must have something in an addon that is running in the "config" portion of the page-load which should be being run AFTER the "init".  Coomon mistake by some addon developers is to try to reference languages or currency in the config portion.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 13 March 2018 - 04:08 PM #6

Then you must have something in an addon that is running in the "config" portion of the page-load which should be being run AFTER the "init".  Coomon mistake by some addon developers is to try to reference languages or currency in the config portion.

You may be bang on. I do notice the following line in the log once in a while

 

Use of undefined constant CART_SECONDARY_CURRENCY - assumed 'CART_SECONDARY_CURRENCY' in /home/xxxx/public_html/app/addons/full_page_cache/func.php on line 198
 
Any advice how to fix it?


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 13 March 2018 - 07:55 PM #7

Yes, that is one of the symptoms of using constants before they are initialized properly.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17368 posts

Posted 14 March 2018 - 07:24 AM #8

You can add the following code before mentioned line

if (!defined('CART_SECONDARY_CURRENCY')) {
    fn_init_currency(array());
}

it should remove error


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • sap
  • Junior Member
  • Members
  • Join Date: 03-Oct 09
  • 113 posts

Posted 14 March 2018 - 02:35 PM #9

You can add the following code before mentioned line

if (!defined('CART_SECONDARY_CURRENCY')) {
    fn_init_currency(array());
}

it should remove error

Thanks I will certainly try this

 

Which error will it remove:

 

Use of undefined constant CART_SECONDARY_CURRENCY - assumed 'CART_SECONDARY_CURRENCY' in /home/xxxx/public_html/app/addons/full_page_cache/func.php on line 198

 

OR

 

PHP Notice: Use of undefined constant DESCR_SL - assumed 'DESCR_SL' in /home/xxxx/public_html/app/functions/fn.companies.php on line 390



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 14 March 2018 - 06:32 PM #10

You can add the following code before mentioned line

if (!defined('CART_SECONDARY_CURRENCY')) {
    fn_init_currency(array());
}

it should remove error

And it will break the proper flow of the cart initialization...  if CART_SECONDARY_CURRENCY is not defined, then there is a more fundamental problem and it should not be covered up.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17368 posts

Posted 15 March 2018 - 06:44 AM #11

And it will break the proper flow of the cart initialization...  if CART_SECONDARY_CURRENCY is not defined, then there is a more fundamental problem and it should not be covered up.

 

No, it will not break anything. This code is used in several core files

 

Thanks I will certainly try this

 

Which error will it remove:

 

Use of undefined constant CART_SECONDARY_CURRENCY - assumed 'CART_SECONDARY_CURRENCY' in /home/xxxx/public_html/app/addons/full_page_cache/func.php on line 198

 

OR

 

PHP Notice: Use of undefined constant DESCR_SL - assumed 'DESCR_SL' in /home/xxxx/public_html/app/functions/fn.companies.php on line 390

 

First one

, just make a search over the code


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 15 March 2018 - 07:08 PM #12

No, it will not break anything. This code is used in several core files

On this, we disagree.  What code outside the core would be executing before the currencies are initialized?  My point is that the  code is constructed incorrectly and is most likely doing something in the config process that should be deferred to a later point.

 

Just ignore the error if you're going to cover it up.  The easiest way to discover is to generate a stack trace

 

If I go into the app directory on the current V4/MVE instance, and do a

find . -type f -name '*.php' -print0 | xargs -0 grep 'defined.*SECOND'

it comes up with no results.  Hence I don't believe that the code is "used in several core files".  Please advise.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17368 posts

Posted 16 March 2018 - 06:30 AM #13

For example, check the fn_init_company_id_redirect function

 

http://prntscr.com/irw8xv

 

Such code can be used is cron tasks, api requests, etc where some functions are called before main initialzation 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 16 March 2018 - 07:15 PM #14

That's a little bit of a different case since it's trying to redirect BEFORE the system has initialized and is trying to get the proper parameters to set for the redirection.

 

In any event, if he's encountering this issue then there is something wrong somewhere since it certainly doesn't behave that way out of the box.  As you stated above, the best check is to disable 3rd party addons and then re-enable one by one till the source is identified.  Tedious but without inserting a bactrace, only way to see what's causing his issue.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 17368 posts

Posted 19 March 2018 - 05:25 AM #15

Right, examination is required in any way. 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 943 posts

Posted 25 March 2018 - 11:47 AM #16

Our error log file appears to show similar issues

25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::query(): Couldn't fetch mysqli in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 79
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  Tygh\Backend\Database\Mysqli::errorCode(): Couldn't fetch mysqli in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 131
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  Error while sending QUERY packet. PID=6091 in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 79
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  Error while sending QUERY packet. PID=6083 in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 79
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  Error while sending QUERY packet. PID=6161 in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 79
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:37:47 Europe/Berlin] PHP Warning:  mysqli::__construct(): (HY000/2002): No such file or directory in /home/pasioonline/public_html/app/Tygh/Backend/Database/Mysqli.php on line 40
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product_code in /home/pasioonline/public_html/app/addons/seo/func.php on line 1822
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product in /home/pasioonline/public_html/app/addons/seo/func.php on line 1823
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product_code in /home/pasioonline/public_html/app/addons/seo/func.php on line 1822
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product in /home/pasioonline/public_html/app/addons/seo/func.php on line 1823
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product_code in /home/pasioonline/public_html/app/addons/seo/func.php on line 1822
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product in /home/pasioonline/public_html/app/addons/seo/func.php on line 1823
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product_code in /home/pasioonline/public_html/app/addons/seo/func.php on line 1822
[25-Mar-2018 13:41:20 Europe/Berlin] PHP Notice:  Undefined index: product in /home/pasioonline/public_html/app/addons/seo/func.php on line 1823

two V4.6.2 and one  V4.2.4 - hedonist working on Sundays


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 25 March 2018 - 06:45 PM #17

Do a "repair" on your database.  It is most likely trying to reference an index that doens't exist.


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 943 posts

Posted 25 March 2018 - 06:59 PM #18

Do a "repair" on your database.  It is most likely trying to reference an index that doens't exist.

 

Via Cpanel you mean Tony?


two V4.6.2 and one  V4.2.4 - hedonist working on Sundays


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 10595 posts

Posted 25 March 2018 - 08:11 PM #19

Yes, or phpMyAdmin


EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • Mongoose
  • Senior Member
  • Members
  • Join Date: 08-Mar 13
  • 943 posts

Posted 25 March 2018 - 08:49 PM #20

Yes, or phpMyAdmin

 

Well thanks for the suggestion but it failed.

pasioonline_mariadb.phinxlog1514373370
note     : The storage engine for the table doesn't support repair
pasioonline_mariadb.phinxlog1521324432
note     : The storage engine for the table doesn't support repair

two V4.6.2 and one  V4.2.4 - hedonist working on Sundays