Zen Cart Logo
Forums / Installing on a Windows Server / newbie needs help. PHP warning

newbie needs help. PHP warning

Views: 3,096

Results 1 to 6 of 6
12 May 2013, 1:13 PM
#1
hardy159 avatar

hardy159

New Zenner

Join Date:
May 2013
Location:
Hørsholm, Denmark
Posts:
5
Plugin Contributions:
0

newbie needs help. PHP warning

I am unable to access www and are getting following PHP warning:

[11-May-2013 15:58:31 Europe/Copenhagen] PHP Warning: require():
Unable to access DIR_FS_CATALOG_LANGUAGESenglish/meta_tags.php
in /home/virtual/hamlet-catering.dk/public_html/catalog/includes/languages/english.php on line 53

[11-May-2013 15:58:31 Europe/Copenhagen] PHP Warning: require
(DIR_FS_CATALOG_LANGUAGESenglish/meta_tags.php): failed to open stream:
No such file or directory in
/home/virtual/hamlet-catering.dk/public_html/catalog/includes/languages/english.php on line 53

[11-May-2013 15:58:31 Europe/Copenhagen] PHP Fatal error: require():
Failed opening required 'DIR_FS_CATALOG_LANGUAGESenglish/meta_tags.php' (include_path='.:/usr/local/lib/php') in
/home/virtual/hamlet-catering.dk/public_html/catalog/includes/languages/english.php on line 53

Have allready checked meta_tags.php and it does not seem corrupted.

these are lines 43-59 in english.php :

// removed for meta tags
// page title
//define('TITLE', 'Zen Cart');

// include template specific meta tags defines
if (file_exists(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/meta_tags.php')) {
$template_dir_select = $template_dir . '/';
} else {
$template_dir_select = '';
}
require(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir_select . 'meta_tags.php');

// meta tags
define('ICON_METATAGS_ON', 'Meta Tags Defined');
define('ICON_METATAGS_OFF', 'Meta Tags Undefined');
define('TEXT_LEGEND_META_TAGS', 'Meta Tags Defined:');
define('TEXT_INFO_META_TAGS_USAGE', '<strong>NOTE:</strong> The Site/Tagline is your defined definition for your site in the meta_tags.php file.');

looking forward to Your help as i am feeling stuck on this one.

12 May 2013, 1:21 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: newbie needs help. PHP warning

english.php on line 53

Check your english.php file at /catalog/includes/languages/english.php
Mine has this for line 53
define('TEXT_GV_NAMES','Gift Certificates');

Also, this line seems to be missing something between red highlited characters

(DIR_FS_CATALOG_LANGUAGESenglish/meta_tags.php):
12 May 2013, 1:37 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: newbie needs help. PHP warning

It looks like you've got a copy of /YOUR_ADMIN/includes/languages/english.php in your store-front /includes/languages/english.php. Go back to your Zen Cart v1.5.1 installation file and restore the store-front version.

12 May 2013, 1:51 PM
#4
hardy159 avatar

hardy159

New Zenner

Join Date:
May 2013
Location:
Hørsholm, Denmark
Posts:
5
Plugin Contributions:
0

Re: newbie needs help. PHP warning

define('TEXT_GV_NAMES','Gift Certificates');

is located in line 77 in mine.

With regard to hightlighted Se then i as well thought that this error log looked strange.

Here is english.php from line 1 - 82

<?php /** * @package admin * @copyright Copyright 2003-2012 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version GIT: $Id: Author: DrByte Wed Sep 5 10:59:13 2012 -0400 Modified in v1.5.1 $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } // added defines for header alt and text define('HEADER_ALT_TEXT', 'Admin Powered by Zen Cart :: The Art of E-Commerce'); define('HEADER_LOGO_WIDTH', '200px'); define('HEADER_LOGO_HEIGHT', '70px'); define('HEADER_LOGO_IMAGE', 'logo.gif'); // look in your $PATH_LOCALE/locale directory for available locales.. setlocale(LC_TIME, 'en_US'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('PHP_DATE_TIME_FORMAT', 'm/d/Y H:i:s'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); define('DATE_FORMAT_SPIFFYCAL', 'MM/dd/yyyy'); //Use only 'dd', 'MM' and 'yyyy' here in any order //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY if (!function_exists('zen_date_raw')) { function zen_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } } // removed for meta tags // page title //define('TITLE', 'Zen Cart'); // include template specific meta tags defines if (file_exists(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir . '/meta_tags.php')) { $template_dir_select = $template_dir . '/'; } else { $template_dir_select = ''; } require(DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/' . $template_dir_select . 'meta_tags.php'); // meta tags define('ICON_METATAGS_ON', 'Meta Tags Defined'); define('ICON_METATAGS_OFF', 'Meta Tags Undefined'); define('TEXT_LEGEND_META_TAGS', 'Meta Tags Defined:'); define('TEXT_INFO_META_TAGS_USAGE', '<strong>NOTE:</strong> The Site/Tagline is your defined definition for your site in the meta_tags.php file.'); // Global entries for the <html> tag define('HTML_PARAMS','dir="ltr" lang="en"'); // charset for web pages and emails define('CHARSET', 'utf-8'); // header text in includes/header.php define('HEADER_TITLE_TOP', 'Admin Home'); define('HEADER_TITLE_SUPPORT_SITE', 'Support Site'); define('HEADER_TITLE_ONLINE_CATALOG', 'Online Catalog'); define('HEADER_TITLE_VERSION', 'Version'); define('HEADER_TITLE_ACCOUNT', 'Account'); define('HEADER_TITLE_LOGOFF', 'Logoff'); //define('HEADER_TITLE_ADMINISTRATION', 'Administration'); // Define the name of your Gift Certificate as Gift Voucher, Gift Certificate, Zen Cart Dollars, etc. here for use through out the shop define('TEXT_GV_NAME','Gift Certificate'); define('TEXT_GV_NAMES','Gift Certificates'); define('TEXT_DISCOUNT_COUPON', 'Discount Coupon'); // used for redeem code, redemption code, or redemption id define('TEXT_GV_REDEEM','Redemption Code');
12 May 2013, 2:04 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,089
Plugin Contributions:
56

Re: newbie needs help. PHP warning

Please see my post#3 for a solution; you've got the admin version of english.php in your store-front directory. I can see this by the highlighted line

<?php
/**
* @package admin
* @copyright Copyright 2003-2012 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Wed Sep 5 10:59:13 2012 -0400 Modified in v1.5.1 $
*/
if (!defined('IS_ADMIN_FLAG'))
{
die('Illegal Access');
}
12 May 2013, 11:30 PM
#6
hardy159 avatar

hardy159

New Zenner

Join Date:
May 2013
Location:
Hørsholm, Denmark
Posts:
5
Plugin Contributions:
0

Re: newbie needs help. PHP warning

Thank You guys. This was the trig. Last modification needed after a major mistake i made. Thanks again.