chrometweaks.org

Is it possible to run your own e-mail iPage hosting service?

Click Here To View All Answers...


My question is Is it possible to run your own e-mail iPage hosting service? Thanks for any answer. Second question of mine... I have installed the meta tags controller contribution, but I get an error when trying to access my page:.

Fatal error: Failed opening required 'DIR_WS_FUNCTIONSheader_tags.php' (include_path='.:/usr/share/pear:/usr/share/php/PEAR') in /customers/hstrading.dk/hstrading.dk/httpd.www/catalog/includes/application_top.php on line 17.

I did copy the file header_tags.php to the folder \catalog\includes\.

So I do not understand why it cannot find this file ? .

Here is a copy of my \catalog\includes\application_top.php file, which it seems to be the one causing the error ? :.

<?php.

Ini_set ( 'session.use_trans_sid', 0);.

/*.

$Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// BOF: WebMakers.com Added: Header Tags Controller v1.0.

Require(DIR_WS_FUNCTIONS'header_tags.php');.

// Clean out HTML comments from ALT tags etc..

Require(DIR_WS_FUNCTIONS'clean_html_comments.php');.

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE.

// EOF: WebMakers.com Added: Header Tags Controller v1.0.

// start the timer for the page parse time log.

Define('PAGE_PARSE_START_TIME', microtime());.

// set the level of error reporting.

Error_reporting(E_ALL & ~E_NOTICE);.

// check if register_globals is enabled..

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized..

If (function_exists('ini_get')) {.

Ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');.

}.

// Set the local configuration parameters - mainly for developers.

If (file_exists('includes/local/configure.php')) include('includes/local/configure.php');.

// include server parameters.

Require('includes/configure.php');.

If (strlen(DB_SERVER) < 1) {.

If (is_dir('install')) {.

Header('Location: install/index.php');.

}.

}.

// define the project version.

Define('PROJECT_VERSION', 'osCommerce 2.2-MS2');.

// set the type of request (secure or not).

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';.

// set php_self in the local scope.

If (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];.

If ($request_type == 'NONSSL') {.

Define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);.

} else {.

Define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);.

}.

// include the list of project filenames.

Require(DIR_WS_INCLUDES'filenames.php');.

// include the list of project database tables.

Require(DIR_WS_INCLUDES'database_tables.php');.

// customization for the design layout.

Define('BOX_WIDTH', 160); // how wide the boxes should be in pixels (default: 125).

// include the database functions.

Require(DIR_WS_FUNCTIONS'database.php');.

// make a connection to the database... now.

Tep_db_connect() or die('Unable to connect to database server!');.

// set the application parameters.

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from 'TABLE_CONFIGURATION);.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

// if gzip_compression is enabled, start to buffer the output.

If ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {.

If (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {.

If (PHP_VERSION >= '4.0.4') {.

Ob_start('ob_gzhandler');.

} else {.

Include(DIR_WS_FUNCTIONS'gzip_compression.php');.

Ob_start();.

Ob_implicit_flush();.

}.

} else {.

Ini_set('zlib.output_compression_level', GZIP_LEVEL);.

}.

}.

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled.

If (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {.

If (strlen(getenv('PATH_INFO')) > 1) {.

$GET_array = array();.

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);.

$vars = explode('/', substr(getenv('PATH_INFO'), 1));.

For ($i=0, $n=sizeof($vars); $i<$n; $i++) {.

If (strpos($vars[$i], '[]')) {.

$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];.

} else {.

$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];.

}.

$i++;.

}.

If (sizeof($GET_array) > 0) {.

While (list($key, $value) = each($GET_array)) {.

$HTTP_GET_VARS[$key] = $value;.

}.

}.

}.

}.

// define general functions used application-wide.

Require(DIR_WS_FUNCTIONS'general.php');.

Require(DIR_WS_FUNCTIONS'html_output.php');.

// set the cookie domain.

$cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);.

$cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);.

// include cache functions if enabled.

If (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS'cache.php');.

// include shopping cart class.

Require(DIR_WS_CLASSES'shopping_cart.php');.

// include navigation history class.

Require(DIR_WS_CLASSES'navigation_history.php');.

// some code to solve compatibility issues.

Require(DIR_WS_FUNCTIONS'compatibility.php');.

// check if sessions are supported, otherwise use the php3 compatible session class.

If (!function_exists('session_start')) {.

Define('PHP_SESSION_NAME', 'osCsid');.

Define('PHP_SESSION_PATH', $cookie_path);.

Define('PHP_SESSION_DOMAIN', $cookie_domain);.

Define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);.

Include(DIR_WS_CLASSES'sessions.php');.

}.

// define how the session functions will be used.

Require(DIR_WS_FUNCTIONS'sessions.php');.

// set the session name and save path.

Tep_session_name('osCsid');.

Tep_session_save_path(SESSION_WRITE_DIRECTORY);.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(0, $cookie_path, $cookie_domain);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '0');.

Ini_set('session.cookie_path', $cookie_path);.

Ini_set('session.cookie_domain', $cookie_domain);.

}.

// set the session ID if it exists.

If (isset($HTTP_POST_VARS[tep_session_name()])) {.

Tep_session_id($HTTP_POST_VARS[tep_session_name()]);.

} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {.

Tep_session_id($HTTP_GET_VARS[tep_session_name()]);.

}.

// start the session.

$session_started = false;.

If (SESSION_FORCE_COOKIE_USE == 'True') {.

Tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);.

If (isset($HTTP_COOKIE_VARS['cookie_test'])) {.

Tep_session_start();.

$session_started = true;.

}.

} elseif (SESSION_BLOCK_SPIDERS == 'True') {.

$user_agent = strtolower(getenv('HTTP_USER_AGENT'));.

$spider_flag = false;.

If (tep_not_null($user_agent)) {.

$spiders = file(DIR_WS_INCLUDES'spiders.txt');.

For ($i=0, $n=sizeof($spiders); $i<$n; $i++) {.

If (tep_not_null($spiders[$i])) {.

If (is_integer(strpos($user_agent, trim($spiders[$i])))) {.

$spider_flag = true;.

Break;.

}.

}.

}.

}.

If ($spider_flag == false) {.

Tep_session_start();.

$session_started = true;.

}.

} else {.

Tep_session_start();.

$session_started = true;.

}.

// set SID once, even if empty.

$SID = (defined('SID') ? SID : '');.

// verify the ssl_session_id if the feature is enabled.

If ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {.

$ssl_session_id = getenv('SSL_SESSION_ID');.

If (!tep_session_is_registered('SSL_SESSION_ID')) {.

$SESSION_SSL_ID = $ssl_session_id;.

Tep_session_register('SESSION_SSL_ID');.

}.

If ($SESSION_SSL_ID != $ssl_session_id) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_SSL_CHECK));.

}.

}.

// verify the browser user agent if the feature is enabled.

If (SESSION_CHECK_USER_AGENT == 'True') {.

$http_user_agent = getenv('HTTP_USER_AGENT');.

If (!tep_session_is_registered('SESSION_USER_AGENT')) {.

$SESSION_USER_AGENT = $http_user_agent;.

Tep_session_register('SESSION_USER_AGENT');.

}.

If ($SESSION_USER_AGENT != $http_user_agent) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// verify the IP address if the feature is enabled.

If (SESSION_CHECK_IP_ADDRESS == 'True') {.

$ip_address = tep_get_ip_address();.

If (!tep_session_is_registered('SESSION_IP_ADDRESS')) {.

$SESSION_IP_ADDRESS = $ip_address;.

Tep_session_register('SESSION_IP_ADDRESS');.

}.

If ($SESSION_IP_ADDRESS != $ip_address) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// create the shopping cart & fix the cart if necesary.

If (tep_session_is_registered('cart') && is_object($cart)) {.

If (PHP_VERSION < 4) {.

$broken_cart = $cart;.

$cart = new shoppingCart;.

$cart->unserialize($broken_cart);.

}.

} else {.

Tep_session_register('cart');.

$cart = new shoppingCart;.

}.

// include currencies class and create an instance.

Require(DIR_WS_CLASSES'currencies.php');.

$currencies = new currencies();.

// include the mail classes.

Require(DIR_WS_CLASSES'mime.php');.

Require(DIR_WS_CLASSES'email.php');.

// set the language.

If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.

If (!tep_session_is_registered('language')) {.

Tep_session_register('language');.

Tep_session_register('languages_id');.

}.

Include(DIR_WS_CLASSES'language.php');.

$lng = new language();.

If (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {.

$lng->set_language($HTTP_GET_VARS['language']);.

} else {.

$lng->get_browser_language();.

}.

$language = $lng->language['directory'];.

$languages_id = $lng->language['id'];.

}.

// include the language translations.

Require(DIR_WS_LANGUAGES$language'.php');.

// currency.

If (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {.

If (!tep_session_is_registered('currency')) tep_session_register('currency');.

If (isset($HTTP_GET_VARS['currency'])) {.

If (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

} else {.

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

}.

}.

// navigation history.

If (tep_session_is_registered('navigation')) {.

If (PHP_VERSION < 4) {.

$broken_navigation = $navigation;.

$navigation = new navigationHistory;.

$navigation->unserialize($broken_navigation);.

}.

} else {.

Tep_session_register('navigation');.

$navigation = new navigationHistory;.

}.

$navigation->add_current_page();.

// Shopping cart actions.

If (isset($HTTP_GET_VARS['action'])) {.

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled.

If ($session_started == false) {.

Tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));.

}.

If (DISPLAY_CART == 'true') {.

$goto = FILENAME_SHOPPING_CART;.

$parameters = array('action', 'cPath', 'products_id', 'pid');.

} else {.

$goto = basename($PHP_SELF);.

If ($HTTP_GET_VARS['action'] == 'buy_now') {.

$parameters = array('action', 'pid', 'products_id');.

} else {.

$parameters = array('action', 'pid');.

}.

}.

Switch ($HTTP_GET_VARS['action']) {.

// customer wants to update the product quantity in their shopping cart.

Case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {.

If (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {.

$cart->remove($HTTP_POST_VARS['products_id'][$i]);.

} else {.

If (PHP_VERSION < 4) {.

// if PHP3, make correction for lack of multidimensional array..

Reset($HTTP_POST_VARS);.

While (list($key, $value) = each($HTTP_POST_VARS)) {.

If (is_array($value)) {.

While (list($key2, $value2) = each($value)) {.

If (ereg ("(.*)\]\[(.*)", $key2, $var)) {.

$id2[$var[1]][$var[2]] = $value2;.

}.

}.

}.

}.

$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';.

} else {.

$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';.

}.

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// customer adds a product from the products page.

Case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {.

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// performed by the 'buy now' button in product listings and review page.

Case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['products_id']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

Case 'notify' : if (tep_session_is_registered('customer_id')) {.

If (isset($HTTP_GET_VARS['products_id'])) {.

$notify = $HTTP_GET_VARS['products_id'];.

} elseif (isset($HTTP_GET_VARS['notify'])) {.

$notify = $HTTP_GET_VARS['notify'];.

} elseif (isset($HTTP_POST_VARS['notify'])) {.

$notify = $HTTP_POST_VARS['notify'];.

} else {.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

}.

If (!is_array($notify)) $notify = array($notify);.

For ($i=0, $n=sizeof($notify); $i<$n; $i++) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$notify[$i]"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] < 1) {.

Tep_db_query("insert into "TABLE_PRODUCTS_NOTIFICATIONS" (products_id, customers_id, date_added) values ('"$notify[$i]"', '"$customer_id"', now())");.

}.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] > 0) {.

Tep_db_query("delete from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['pid']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

}.

}.

// include the who's online functions.

Require(DIR_WS_FUNCTIONS'whos_online.php');.

Tep_update_whos_online();.

// include the password crypto functions.

Require(DIR_WS_FUNCTIONS'password_funcs.php');.

// include validation functions (right now only email address).

Require(DIR_WS_FUNCTIONS'validations.php');.

// split-page-results.

Require(DIR_WS_CLASSES'split_page_results.php');.

// infobox.

Require(DIR_WS_CLASSES'boxes.php');.

// auto activate and expire banners.

Require(DIR_WS_FUNCTIONS'banner.php');.

Tep_activate_banners();.

Tep_expire_banners();.

// auto expire special products.

Require(DIR_WS_FUNCTIONS'specials.php');.

Tep_expire_specials();.

// calculate category path.

If (isset($HTTP_GET_VARS['cPath'])) {.

$cPath = $HTTP_GET_VARS['cPath'];.

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {.

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);.

} else {.

$cPath = '';.

}.

If (tep_not_null($cPath)) {.

$cPath_array = tep_parse_category_path($cPath);.

$cPath = implode('_', $cPath_array);.

$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];.

} else {.

$current_category_id = 0;.

}.

// include the breadcrumb class and start the breadcrumb trail.

Require(DIR_WS_CLASSES'breadcrumb.php');.

If ( ($HTTP_GET_VARS['currency']) ) {.

Tep_session_register('kill_sid');.

$kill_sid=false;.

}.

If (basename($_SERVER['HTTP_REFERER']) == 'allprods.php' ) $kill_sid = true;.

If ( ( !tep_session_is_registered('customer_id') ) && ( $cart->count_contents()==0 ) && (!tep_session_is_registered('kill_sid') ) ) $kill_sid = true;.

If ((basename($PHP_SELF) == FILENAME_LOGIN) && ($HTTP_GET_VARS['action'] == 'process') ) $kill_sid = false;.

If (basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT_PROCESS) $kill_sid = false;.

// Uncomment line bellow to disable SID Killer.

// $kill_sid = false;.

$breadcrumb = new breadcrumb;.

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);.

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));.

// add category names or the manufacturer name to the breadcrumb trail.

If (isset($cPath_array)) {.

For ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {.

$categories_query = tep_db_query("select categories_name from "TABLE_CATEGORIES_DESCRIPTION" where categories_id = '"(int)$cPath_array[$i]"' and language_id = '"(int)$languages_id"'");.

If (tep_db_num_rows($categories_query) > 0) {.

$categories = tep_db_fetch_array($categories_query);.

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath='implode('_', array_slice($cPath_array, 0, ($i+1)))));.

} else {.

Break;.

}.

}.

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {.

$manufacturers_query = tep_db_query("select manufacturers_name from "TABLE_MANUFACTURERS" where manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'");.

If (tep_db_num_rows($manufacturers_query)) {.

$manufacturers = tep_db_fetch_array($manufacturers_query);.

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id='$HTTP_GET_VARS['manufacturers_id']));.

}.

}.

// add the products model to the breadcrumb trail.

If (isset($HTTP_GET_VARS['products_id'])) {.

$model_query = tep_db_query("select products_model from "TABLE_PRODUCTS" where products_id = '"(int)$HTTP_GET_VARS['products_id']"'");.

If (tep_db_num_rows($model_query)) {.

$model = tep_db_fetch_array($model_query);.

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath='$cPath'&products_id='$HTTP_GET_VARS['products_id']));.

}.

}.

// initialize the message stack for output messages.

Require(DIR_WS_CLASSES'message_stack.php');.

$messageStack = new messageStack;.

// set which precautions should be checked.

Define('WARN_INSTALL_EXISTENCE', 'true');.

Define('WARN_CONFIG_WRITEABLE', 'true');.

Define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');.

Define('WARN_SESSION_AUTO_START', 'true');.

Define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');.

// set the pollbooth parameters (can be modified through the administration tool).

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from phesis_poll_config');.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

?>.

I would really appreciate if anyone could give me a hint. :-)..

Comments (26)

Yes sir! although you might wanna make sure and wait for another person to confirm this as I am not confident. Better yet, why don't you contact the iPage guys because they can answer you better...

Comment #1

Hi Qihun.

Thx for trying to help me out, but i'm afraid I don't quite understand what you mean..

I did copy the header_tags.php file to the catalog/includes/functions/ folder if that is what you mean ? And I did double check that I have two files that are called header_tags.php one of 2KB of size and one of 10KB - each of them has been copied to the correct folder..

I Appreciate you trying to help me out, and I hope that someone is able to see what the problem is...

Comment #2

Have you put the relevant header_tags file in the include/functions directory ?

Comment #3

Yes, the header_tags.php file is in the \catalog\includes\functions\ folder so that should not be the problem...

Comment #4

Hi HStrading ! sorry about my english..

I see your page just fine nowcan you post here what was the problem ? .

Thanx...

Comment #5

Thats' okay :-).

My page is not running the contribution right now, as it is a live shop. But when is test the contrib on my live shop (last night) I got this error:.

Fatal error: Failed opening required 'DIR_WS_FUNCTIONSheader_tags.php' (include_path='.:/usr/share/pear:/usr/share/php/PEAR') in /customers/hstrading.dk/hstrading.dk/httpd.www/catalog/includes/application_top.php on line 17.

I would really like to use this contribution, but I cannot seem to find out how to correct this error ?

Comment #6

It appears from the Fatal error: Failed opening required 'DIR_WS_FUNCTIONSheader_tags.php' that you have an incorrect setting in your configure.php file. post that here, without the database info..

It is around the functions setting in configure.php..

Comment #7

This is my \catalog\includes\configure.php file:.

<?php.

/*.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// Define the webserver and path parameters.

// * DIR_FS_* = Filesystem directories (local/physical).

// * DIR_WS_* = Webserver directories (virtual/URL).

Define('HTTP_SERVER', 'http://www.hstrading.dk'); // eg,.

Http://localhost.

- should not be empty for productive servers.

Define('HTTPS_SERVER', 'https://www.hstrading.dk'); // eg,.

Https://localhost.

- should not be empty for productive servers.

Define('ENABLE_SSL', false); // secure webserver for checkout procedure?.

Define('HTTP_COOKIE_DOMAIN', 'www.hstrading.dk');.

Define('HTTPS_COOKIE_DOMAIN', 'www.hstrading.dk');.

Define('HTTP_COOKIE_PATH', '/');.

Define('HTTPS_COOKIE_PATH', '/');.

Define('DIR_WS_HTTP_CATALOG', '/catalog/');.

Define('DIR_WS_HTTPS_CATALOG', '/catalog/');.

Define('DIR_WS_IMAGES', 'images/');.

Define('DIR_WS_ICONS', DIR_WS_IMAGES'icons/');.

Define('DIR_WS_INCLUDES', 'includes/');.

Define('DIR_WS_BOXES', DIR_WS_INCLUDES'boxes/');.

Define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES'functions/');.

Define('DIR_WS_CLASSES', DIR_WS_INCLUDES'classes/');.

Define('DIR_WS_MODULES', DIR_WS_INCLUDES'modules/');.

Define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES'languages/');.

Define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');.

Define('DIR_FS_CATALOG', '/customers/hstrading.dk/hstrading.dk/httpd.www/catalog/');.

Define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG'download/');.

Define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG'pub/');.

I have not posted the database database definition lines..

Hope this will be able to help you / me :-)..

Comment #8

SUCCESS !! :-).

That worked, thank you very much for your help !..

Comment #9

Ohhh too early.... Everything seems to work okay, but I have one thing that look strange, both appear when entering a new product, or editing an existing product:.

When I edit an existing product, the name of the product disappears. It seems like the error is caused on the page where you edit a product..

- because on the edit product page, there is no field where I can enter the product name... ? .

The page looks like this:.

Produkt Status: P lager Ikke p lager.

Leveres fra:.

(YYYY-MM-DD).

Producent: ingenAromatic FeelingKatalogerLR International.

Produkt Beskrivelse:.

TEXT_PRODUCT_METTA_INFO.

Products Page Title:.

Page Header Description:.

Product Keywords:.

Skatte klasse: ingenMoms.

Products Pris (excl. moms):.

Products Pris (incl. moms):.

Produkt Beskrivelse:.

Produkt Mngde:.

Produkt Model:.

Produkt Billede:.

Produktets URL:.

(uden http://).

Produktets vgt:.

The only place where it seems that the product name can be entered is:.

TEXT_PRODUCT_METTA_INFO.

Products Page Title:.

But this is META information, and it is not displayed in the shop..

I hope I express myself clearly, and that somebody is able to help me :-)..

Comment #10

To better illustrate the strange apperance of my edit product page, I have taken a screenshot:.

Http://www.hstrading...gscreenshot.jpg.

The text is in danish, but I hope you are able to see that something is wrong. e.g the field "Produkt Beskrivelse:" (product description) appears twice + the one time in the META fields..

As you can see, there is no where for me to enter the product's name, and when I edit an existing product, the product name just disappears..

My screenshot does not at all, look like the screenshot that was included with the install files for the contribution (i have put it here) :.

Http://www.hstrading.dk/ScreenShot.gif.

Hope this enables you to help me out, i'm THIS close to making it work ;-)..

Comment #11

Looks like you have to compare your admin/categories.php with original.

Some missing lines may be ? .

And you have missing line in admin/includes/languages/english(or danish)/categories.php.

Define('TEXT_PRODUCT_METTA_INFO', '<b>Meta Tag Information</b>');.

I am not using this module (yet) , so I do not know how it's works..

About screenshot included in the modul, may be it's just different version of osCommerce...

Comment #12

Too bad.. I have tried the things you said, but still no go.....

Maybe I just need to realize that I have to be without this contrib :-(.

Thx for your help anyway ! :-)..

Comment #13

I have installed the meta tags controller contribution, but I get an error when trying to access my page:.

Fatal error: Failed opening required 'DIR_WS_FUNCTIONSheader_tags.php' (include_path='.:/usr/share/pear:/usr/share/php/PEAR') in /customers/hstrading.dk/hstrading.dk/httpd.www/catalog/includes/application_top.php on line 17.

I did copy the file header_tags.php to the folder \catalog\includes\.

So I do not understand why it cannot find this file ? .

Here is a copy of my \catalog\includes\application_top.php file, which it seems to be the one causing the error ? :.

<?php.

Ini_set ( 'session.use_trans_sid', 0);.

/*.

$Id: application_top.php,v 1.280 2003/07/12 09:38:07 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

// BOF: WebMakers.com Added: Header Tags Controller v1.0.

Require(DIR_WS_FUNCTIONS'header_tags.php');.

// Clean out HTML comments from ALT tags etc..

Require(DIR_WS_FUNCTIONS'clean_html_comments.php');.

// Also used by: WebMakers.com Added: FREE-CALL FOR PRICE.

// EOF: WebMakers.com Added: Header Tags Controller v1.0.

// start the timer for the page parse time log.

Define('PAGE_PARSE_START_TIME', microtime());.

// set the level of error reporting.

Error_reporting(E_ALL & ~E_NOTICE);.

// check if register_globals is enabled..

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized..

If (function_exists('ini_get')) {.

Ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');.

}.

// Set the local configuration parameters - mainly for developers.

If (file_exists('includes/local/configure.php')) include('includes/local/configure.php');.

// include server parameters.

Require('includes/configure.php');.

If (strlen(DB_SERVER) < 1) {.

If (is_dir('install')) {.

Header('Location: install/index.php');.

}.

}.

// define the project version.

Define('PROJECT_VERSION', 'osCommerce 2.2-MS2');.

// set the type of request (secure or not).

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';.

// set php_self in the local scope.

If (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];.

If ($request_type == 'NONSSL') {.

Define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);.

} else {.

Define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);.

}.

// include the list of project filenames.

Require(DIR_WS_INCLUDES'filenames.php');.

// include the list of project database tables.

Require(DIR_WS_INCLUDES'database_tables.php');.

// customization for the design layout.

Define('BOX_WIDTH', 160); // how wide the boxes should be in pixels (default: 125).

// include the database functions.

Require(DIR_WS_FUNCTIONS'database.php');.

// make a connection to the database... now.

Tep_db_connect() or die('Unable to connect to database server!');.

// set the application parameters.

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from 'TABLE_CONFIGURATION);.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

// if gzip_compression is enabled, start to buffer the output.

If ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && (PHP_VERSION >= '4') ) {.

If (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {.

If (PHP_VERSION >= '4.0.4') {.

Ob_start('ob_gzhandler');.

} else {.

Include(DIR_WS_FUNCTIONS'gzip_compression.php');.

Ob_start();.

Ob_implicit_flush();.

}.

} else {.

Ini_set('zlib.output_compression_level', GZIP_LEVEL);.

}.

}.

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled.

If (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {.

If (strlen(getenv('PATH_INFO')) > 1) {.

$GET_array = array();.

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);.

$vars = explode('/', substr(getenv('PATH_INFO'), 1));.

For ($i=0, $n=sizeof($vars); $i<$n; $i++) {.

If (strpos($vars[$i], '[]')) {.

$GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];.

} else {.

$HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];.

}.

$i++;.

}.

If (sizeof($GET_array) > 0) {.

While (list($key, $value) = each($GET_array)) {.

$HTTP_GET_VARS[$key] = $value;.

}.

}.

}.

}.

// define general functions used application-wide.

Require(DIR_WS_FUNCTIONS'general.php');.

Require(DIR_WS_FUNCTIONS'html_output.php');.

// set the cookie domain.

$cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);.

$cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);.

// include cache functions if enabled.

If (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS'cache.php');.

// include shopping cart class.

Require(DIR_WS_CLASSES'shopping_cart.php');.

// include navigation history class.

Require(DIR_WS_CLASSES'navigation_history.php');.

// some code to solve compatibility issues.

Require(DIR_WS_FUNCTIONS'compatibility.php');.

// check if sessions are supported, otherwise use the php3 compatible session class.

If (!function_exists('session_start')) {.

Define('PHP_SESSION_NAME', 'osCsid');.

Define('PHP_SESSION_PATH', $cookie_path);.

Define('PHP_SESSION_DOMAIN', $cookie_domain);.

Define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);.

Include(DIR_WS_CLASSES'sessions.php');.

}.

// define how the session functions will be used.

Require(DIR_WS_FUNCTIONS'sessions.php');.

// set the session name and save path.

Tep_session_name('osCsid');.

Tep_session_save_path(SESSION_WRITE_DIRECTORY);.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(0, $cookie_path, $cookie_domain);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '0');.

Ini_set('session.cookie_path', $cookie_path);.

Ini_set('session.cookie_domain', $cookie_domain);.

}.

// set the session ID if it exists.

If (isset($HTTP_POST_VARS[tep_session_name()])) {.

Tep_session_id($HTTP_POST_VARS[tep_session_name()]);.

} elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {.

Tep_session_id($HTTP_GET_VARS[tep_session_name()]);.

}.

// start the session.

$session_started = false;.

If (SESSION_FORCE_COOKIE_USE == 'True') {.

Tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);.

If (isset($HTTP_COOKIE_VARS['cookie_test'])) {.

Tep_session_start();.

$session_started = true;.

}.

} elseif (SESSION_BLOCK_SPIDERS == 'True') {.

$user_agent = strtolower(getenv('HTTP_USER_AGENT'));.

$spider_flag = false;.

If (tep_not_null($user_agent)) {.

$spiders = file(DIR_WS_INCLUDES'spiders.txt');.

For ($i=0, $n=sizeof($spiders); $i<$n; $i++) {.

If (tep_not_null($spiders[$i])) {.

If (is_integer(strpos($user_agent, trim($spiders[$i])))) {.

$spider_flag = true;.

Break;.

}.

}.

}.

}.

If ($spider_flag == false) {.

Tep_session_start();.

$session_started = true;.

}.

} else {.

Tep_session_start();.

$session_started = true;.

}.

// set SID once, even if empty.

$SID = (defined('SID') ? SID : '');.

// verify the ssl_session_id if the feature is enabled.

If ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {.

$ssl_session_id = getenv('SSL_SESSION_ID');.

If (!tep_session_is_registered('SSL_SESSION_ID')) {.

$SESSION_SSL_ID = $ssl_session_id;.

Tep_session_register('SESSION_SSL_ID');.

}.

If ($SESSION_SSL_ID != $ssl_session_id) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_SSL_CHECK));.

}.

}.

// verify the browser user agent if the feature is enabled.

If (SESSION_CHECK_USER_AGENT == 'True') {.

$http_user_agent = getenv('HTTP_USER_AGENT');.

If (!tep_session_is_registered('SESSION_USER_AGENT')) {.

$SESSION_USER_AGENT = $http_user_agent;.

Tep_session_register('SESSION_USER_AGENT');.

}.

If ($SESSION_USER_AGENT != $http_user_agent) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// verify the IP address if the feature is enabled.

If (SESSION_CHECK_IP_ADDRESS == 'True') {.

$ip_address = tep_get_ip_address();.

If (!tep_session_is_registered('SESSION_IP_ADDRESS')) {.

$SESSION_IP_ADDRESS = $ip_address;.

Tep_session_register('SESSION_IP_ADDRESS');.

}.

If ($SESSION_IP_ADDRESS != $ip_address) {.

Tep_session_destroy();.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

}.

// create the shopping cart & fix the cart if necesary.

If (tep_session_is_registered('cart') && is_object($cart)) {.

If (PHP_VERSION < 4) {.

$broken_cart = $cart;.

$cart = new shoppingCart;.

$cart->unserialize($broken_cart);.

}.

} else {.

Tep_session_register('cart');.

$cart = new shoppingCart;.

}.

// include currencies class and create an instance.

Require(DIR_WS_CLASSES'currencies.php');.

$currencies = new currencies();.

// include the mail classes.

Require(DIR_WS_CLASSES'mime.php');.

Require(DIR_WS_CLASSES'email.php');.

// set the language.

If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.

If (!tep_session_is_registered('language')) {.

Tep_session_register('language');.

Tep_session_register('languages_id');.

}.

Include(DIR_WS_CLASSES'language.php');.

$lng = new language();.

If (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {.

$lng->set_language($HTTP_GET_VARS['language']);.

} else {.

$lng->get_browser_language();.

}.

$language = $lng->language['directory'];.

$languages_id = $lng->language['id'];.

}.

// include the language translations.

Require(DIR_WS_LANGUAGES$language'.php');.

// currency.

If (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {.

If (!tep_session_is_registered('currency')) tep_session_register('currency');.

If (isset($HTTP_GET_VARS['currency'])) {.

If (!$currency = tep_currency_exists($HTTP_GET_VARS['currency'])) $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

} else {.

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;.

}.

}.

// navigation history.

If (tep_session_is_registered('navigation')) {.

If (PHP_VERSION < 4) {.

$broken_navigation = $navigation;.

$navigation = new navigationHistory;.

$navigation->unserialize($broken_navigation);.

}.

} else {.

Tep_session_register('navigation');.

$navigation = new navigationHistory;.

}.

$navigation->add_current_page();.

// Shopping cart actions.

If (isset($HTTP_GET_VARS['action'])) {.

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled.

If ($session_started == false) {.

Tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));.

}.

If (DISPLAY_CART == 'true') {.

$goto = FILENAME_SHOPPING_CART;.

$parameters = array('action', 'cPath', 'products_id', 'pid');.

} else {.

$goto = basename($PHP_SELF);.

If ($HTTP_GET_VARS['action'] == 'buy_now') {.

$parameters = array('action', 'pid', 'products_id');.

} else {.

$parameters = array('action', 'pid');.

}.

}.

Switch ($HTTP_GET_VARS['action']) {.

// customer wants to update the product quantity in their shopping cart.

Case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {.

If (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {.

$cart->remove($HTTP_POST_VARS['products_id'][$i]);.

} else {.

If (PHP_VERSION < 4) {.

// if PHP3, make correction for lack of multidimensional array..

Reset($HTTP_POST_VARS);.

While (list($key, $value) = each($HTTP_POST_VARS)) {.

If (is_array($value)) {.

While (list($key2, $value2) = each($value)) {.

If (ereg ("(.*)\]\[(.*)", $key2, $var)) {.

$id2[$var[1]][$var[2]] = $value2;.

}.

}.

}.

}.

$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';.

} else {.

$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';.

}.

$cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// customer adds a product from the products page.

Case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {.

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

// performed by the 'buy now' button in product listings and review page.

Case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['products_id']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

Case 'notify' : if (tep_session_is_registered('customer_id')) {.

If (isset($HTTP_GET_VARS['products_id'])) {.

$notify = $HTTP_GET_VARS['products_id'];.

} elseif (isset($HTTP_GET_VARS['notify'])) {.

$notify = $HTTP_GET_VARS['notify'];.

} elseif (isset($HTTP_POST_VARS['notify'])) {.

$notify = $HTTP_POST_VARS['notify'];.

} else {.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

}.

If (!is_array($notify)) $notify = array($notify);.

For ($i=0, $n=sizeof($notify); $i<$n; $i++) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$notify[$i]"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] < 1) {.

Tep_db_query("insert into "TABLE_PRODUCTS_NOTIFICATIONS" (products_id, customers_id, date_added) values ('"$notify[$i]"', '"$customer_id"', now())");.

}.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {.

$check_query = tep_db_query("select count(*) as count from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

$check = tep_db_fetch_array($check_query);.

If ($check['count'] > 0) {.

Tep_db_query("delete from "TABLE_PRODUCTS_NOTIFICATIONS" where products_id = '"$HTTP_GET_VARS['products_id']"' and customers_id = '"$customer_id"'");.

}.

Tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));.

} else {.

$navigation->set_snapshot();.

Tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Break;.

Case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {.

If (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {.

Tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='$HTTP_GET_VARS['pid']));.

} else {.

$cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);.

}.

}.

Tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));.

Break;.

}.

}.

// include the who's online functions.

Require(DIR_WS_FUNCTIONS'whos_online.php');.

Tep_update_whos_online();.

// include the password crypto functions.

Require(DIR_WS_FUNCTIONS'password_funcs.php');.

// include validation functions (right now only email address).

Require(DIR_WS_FUNCTIONS'validations.php');.

// split-page-results.

Require(DIR_WS_CLASSES'split_page_results.php');.

// infobox.

Require(DIR_WS_CLASSES'boxes.php');.

// auto activate and expire banners.

Require(DIR_WS_FUNCTIONS'banner.php');.

Tep_activate_banners();.

Tep_expire_banners();.

// auto expire special products.

Require(DIR_WS_FUNCTIONS'specials.php');.

Tep_expire_specials();.

// calculate category path.

If (isset($HTTP_GET_VARS['cPath'])) {.

$cPath = $HTTP_GET_VARS['cPath'];.

} elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) {.

$cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);.

} else {.

$cPath = '';.

}.

If (tep_not_null($cPath)) {.

$cPath_array = tep_parse_category_path($cPath);.

$cPath = implode('_', $cPath_array);.

$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];.

} else {.

$current_category_id = 0;.

}.

// include the breadcrumb class and start the breadcrumb trail.

Require(DIR_WS_CLASSES'breadcrumb.php');.

If ( ($HTTP_GET_VARS['currency']) ) {.

Tep_session_register('kill_sid');.

$kill_sid=false;.

}.

If (basename($_SERVER['HTTP_REFERER']) == 'allprods.php' ) $kill_sid = true;.

If ( ( !tep_session_is_registered('customer_id') ) && ( $cart->count_contents()==0 ) && (!tep_session_is_registered('kill_sid') ) ) $kill_sid = true;.

If ((basename($PHP_SELF) == FILENAME_LOGIN) && ($HTTP_GET_VARS['action'] == 'process') ) $kill_sid = false;.

If (basename($PHP_SELF) == FILENAME_CREATE_ACCOUNT_PROCESS) $kill_sid = false;.

// Uncomment line bellow to disable SID Killer.

// $kill_sid = false;.

$breadcrumb = new breadcrumb;.

$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);.

$breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));.

// add category names or the manufacturer name to the breadcrumb trail.

If (isset($cPath_array)) {.

For ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {.

$categories_query = tep_db_query("select categories_name from "TABLE_CATEGORIES_DESCRIPTION" where categories_id = '"(int)$cPath_array[$i]"' and language_id = '"(int)$languages_id"'");.

If (tep_db_num_rows($categories_query) > 0) {.

$categories = tep_db_fetch_array($categories_query);.

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath='implode('_', array_slice($cPath_array, 0, ($i+1)))));.

} else {.

Break;.

}.

}.

} elseif (isset($HTTP_GET_VARS['manufacturers_id'])) {.

$manufacturers_query = tep_db_query("select manufacturers_name from "TABLE_MANUFACTURERS" where manufacturers_id = '"(int)$HTTP_GET_VARS['manufacturers_id']"'");.

If (tep_db_num_rows($manufacturers_query)) {.

$manufacturers = tep_db_fetch_array($manufacturers_query);.

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id='$HTTP_GET_VARS['manufacturers_id']));.

}.

}.

// add the products model to the breadcrumb trail.

If (isset($HTTP_GET_VARS['products_id'])) {.

$model_query = tep_db_query("select products_model from "TABLE_PRODUCTS" where products_id = '"(int)$HTTP_GET_VARS['products_id']"'");.

If (tep_db_num_rows($model_query)) {.

$model = tep_db_fetch_array($model_query);.

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath='$cPath'&products_id='$HTTP_GET_VARS['products_id']));.

}.

}.

// initialize the message stack for output messages.

Require(DIR_WS_CLASSES'message_stack.php');.

$messageStack = new messageStack;.

// set which precautions should be checked.

Define('WARN_INSTALL_EXISTENCE', 'true');.

Define('WARN_CONFIG_WRITEABLE', 'true');.

Define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');.

Define('WARN_SESSION_AUTO_START', 'true');.

Define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');.

// set the pollbooth parameters (can be modified through the administration tool).

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from phesis_poll_config');.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

?>.

I would really appreciate if anyone could give me a hint. :-)..

Comment #14

Do you have header_tags.php for catalog/includes/functions.

In contribution 2 header_tags.php.

And error ask about functions..

Comment #15


This question was taken from a support group/message board and re-posted here so others can learn from it.