Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

epwork

PHP Error "Use of undefined constant ... " displaying all of a sudden

2 posts in this topic

Help! Why is this error displaying all of a sudden on my pages? Functionality seems to be fine.

Here's the error code:

[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant MENU_TEXT_PRODUCTS - assumed 'MENU_TEXT_PRODUCTS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 2
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant FILENAME_DEFAULT - assumed 'FILENAME_DEFAULT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 8
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_ALL - assumed 'TEXT_CART_VIEW_ALL' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 18
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_LESS - assumed 'TEXT_CART_VIEW_LESS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 19 [
08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_MORE_ITEMS - assumed 'TEXT_CART_MORE_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 20
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_ITEMS - assumed 'TEXT_CART_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 21
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_EDIT - assumed 'TEXT_CART_VIEW_EDIT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 22
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant MENU_TEXT_PRODUCTS - assumed 'MENU_TEXT_PRODUCTS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 2
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant FILENAME_DEFAULT - assumed 'FILENAME_DEFAULT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 8
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_ALL - assumed 'TEXT_CART_VIEW_ALL' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 18
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_LESS - assumed 'TEXT_CART_VIEW_LESS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 19
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_MORE_ITEMS - assumed 'TEXT_CART_MORE_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 20
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_ITEMS - assumed 'TEXT_CART_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 21
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_EDIT - assumed 'TEXT_CART_VIEW_EDIT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 22

 

 

And here's my current cart.php file the error is referring to:

 

<?php
$tmpl['txt']['products'] = MENU_TEXT_PRODUCTS;

$tmpl['cfg']['left_column'] = true;
$tmpl['cfg']['right_column'] = false;

$tmpl['cfg']['banner_slider'] = false;
if (basename($_SERVER['PHP_SELF']) == FILENAME_DEFAULT && !isset($_REQUEST['cPath']) && !isset($_REQUEST['manufacturers_id'])) {
 $tmpl['cfg']['banner_slider'] = true;
}

$tmpl['cfg']['max_display_index_products'] = 5;
 define('BOX_INFORMATION_SHIPPING', 'shipping & returns');
 define('BOX_INFORMATION_PRIVACY', 'privacy notice');
 define('BOX_INFORMATION_CONDITIONS', 'terms & conditions');
 define('BOX_HEADING_SPECIALS', 'Special');
 define('BOX_HEADING_BESTSELLERS', 'Bestsellers');
$tmpl['txt']['cart_view_all'] = TEXT_CART_VIEW_ALL;
$tmpl['txt']['cart_view_less'] = TEXT_CART_VIEW_LESS;
$tmpl['txt']['cart_more_items'] = TEXT_CART_MORE_ITEMS;
$tmpl['txt']['cart_items'] = TEXT_CART_ITEMS;
$tmpl['txt']['view_cart'] = TEXT_CART_VIEW_EDIT;

?>

 

Would like to correct ASAP so it's not showing to the world but also why working it was fine then now not!

 

Thanks in advance!!!

Share this post


Link to post
Share on other sites

Help! Why is this error displaying all of a sudden on my pages? Functionality seems to be fine.

Here's the error code:

[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant MENU_TEXT_PRODUCTS - assumed 'MENU_TEXT_PRODUCTS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 2
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant FILENAME_DEFAULT - assumed 'FILENAME_DEFAULT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 8
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_ALL - assumed 'TEXT_CART_VIEW_ALL' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 18
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_LESS - assumed 'TEXT_CART_VIEW_LESS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 19 [
08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_MORE_ITEMS - assumed 'TEXT_CART_MORE_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 20
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_ITEMS - assumed 'TEXT_CART_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 21
[08-Aug-2012 06:47:06 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_EDIT - assumed 'TEXT_CART_VIEW_EDIT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 22
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant MENU_TEXT_PRODUCTS - assumed 'MENU_TEXT_PRODUCTS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 2
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant FILENAME_DEFAULT - assumed 'FILENAME_DEFAULT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 8
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_ALL - assumed 'TEXT_CART_VIEW_ALL' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 18
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_LESS - assumed 'TEXT_CART_VIEW_LESS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 19
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_MORE_ITEMS - assumed 'TEXT_CART_MORE_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 20
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_ITEMS - assumed 'TEXT_CART_ITEMS' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 21
[08-Aug-2012 06:47:24 UTC] PHP Notice: Use of undefined constant TEXT_CART_VIEW_EDIT - assumed 'TEXT_CART_VIEW_EDIT' in /home3/waybent1/public_html/houseofaberrant.com/az_template/includes/modules/config/cart.php on line 22

 

 

And here's my current cart.php file the error is referring to:

 

<?php
$tmpl['txt']['products'] = MENU_TEXT_PRODUCTS;

$tmpl['cfg']['left_column'] = true;
$tmpl['cfg']['right_column'] = false;

$tmpl['cfg']['banner_slider'] = false;
if (basename($_SERVER['PHP_SELF']) == FILENAME_DEFAULT && !isset($_REQUEST['cPath']) && !isset($_REQUEST['manufacturers_id'])) {
 $tmpl['cfg']['banner_slider'] = true;
}

$tmpl['cfg']['max_display_index_products'] = 5;
 define('BOX_INFORMATION_SHIPPING', 'shipping & returns');
 define('BOX_INFORMATION_PRIVACY', 'privacy notice');
 define('BOX_INFORMATION_CONDITIONS', 'terms & conditions');
 define('BOX_HEADING_SPECIALS', 'Special');
 define('BOX_HEADING_BESTSELLERS', 'Bestsellers');
$tmpl['txt']['cart_view_all'] = TEXT_CART_VIEW_ALL;
$tmpl['txt']['cart_view_less'] = TEXT_CART_VIEW_LESS;
$tmpl['txt']['cart_more_items'] = TEXT_CART_MORE_ITEMS;
$tmpl['txt']['cart_items'] = TEXT_CART_ITEMS;
$tmpl['txt']['view_cart'] = TEXT_CART_VIEW_EDIT;

?>

 

Would like to correct ASAP so it's not showing to the world but also why working it was fine then now not!

 

Thanks in advance!!!

 

OK all fixed! So learned PHP Notice is not an "Error" and not as bad as a "PHP Warning" or "PHP Error." Still no reason why it happened, but finally able to have the "Notice" messages from displaying on my webpage.

 

I added the following to my .htaccess and then had to delete the errors from my error log that were generated.

# Use PHP5.3 Single php.ini as default
AddHandler application/x-httpd-php53s .php

 

This website will be the bane of my existence! Maybe this will at least help someone else.

Share this post


Link to post
Share on other sites