Jump to content

daniaw

Members
  • Content count

    24
  • Joined

  • Last visited

Everything posted by daniaw

  1. But, but, but... of course... everything was working before :D This site is so new that it still has the default OSC layout, and even the default home page with the default message. I haven't even changed that part yet :) Would it have something to do with the version of OSC to do? Like the version I have running is Ver 2.2-MS2, and the server version of PHP is 4.4.4 - would that do anything to the coding part of the of the compatibility? Just a thought...
  2. Skittles, If I follow your directions (and I do below I can comprehend them just fine), then there shouldn't be any spaces between beginning and ending of the pages... I have "attached" my pages here, and used ************** to show the beginning and ending of the pages. I still can't see that there is anything wrong with the pages in accordance to your directions... or maybe I am wrong??! APPLICATION_TOP.PHP ************** <?php /* $Id: application_top.php,v 1.162 2003/07/12 09:39:03 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // Start the clock 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('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.'); } // Set the local configuration parameters - mainly for developers if (file_exists('includes/local/configure.php')) include('includes/local/configure.php'); // Include application configuration parameters require('includes/configure.php'); // Define the project version define('PROJECT_VERSION', 'osCommerce 2.2-MS2'); // set php_self in the local scope $PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']); // Used in the "Backup Manager" to compress backups define('LOCAL_EXE_GZIP', '/usr/bin/gzip'); define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip'); define('LOCAL_EXE_ZIP', '/usr/local/bin/zip'); define('LOCAL_EXE_UNZIP', '/usr/local/bin/unzip'); // 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', 125); // how wide the boxes should be in pixels (default: 125) // Define how do we update currency exchange rates // Possible values are 'oanda' 'xe' or '' define('CURRENCY_SERVER_PRIMARY', 'oanda'); define('CURRENCY_SERVER_BACKUP', 'xe'); // 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 application wide 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']); } // define our general functions used application-wide require(DIR_WS_FUNCTIONS . 'general.php'); require(DIR_WS_FUNCTIONS . 'html_output.php'); // initialize the logger class require(DIR_WS_CLASSES . 'logger.php'); // include shopping cart class require(DIR_WS_CLASSES . 'shopping_cart.php'); // some code to solve compatibility issues require(DIR_WS_FUNCTIONS . 'compatibility.php'); // check to see if php implemented session management functions - if not, include php3/php4 compatible session class if (!function_exists('session_start')) { define('PHP_SESSION_NAME', 'osCAdminID'); define('PHP_SESSION_PATH', '/'); 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('osCAdminID'); tep_session_save_path(SESSION_WRITE_DIRECTORY); // set the session cookie parameters if (function_exists('session_set_cookie_params')) { session_set_cookie_params(0, DIR_WS_ADMIN); } elseif (function_exists('ini_set')) { ini_set('session.cookie_lifetime', '0'); ini_set('session.cookie_path', DIR_WS_ADMIN); } // lets start our session tep_session_start(); // 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'); $current_page = basename($PHP_SELF); if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) { include(DIR_WS_LANGUAGES . $language . '/' . $current_page); } // define our localization functions require(DIR_WS_FUNCTIONS . 'localization.php'); // Include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // setup our boxes require(DIR_WS_CLASSES . 'table_block.php'); require(DIR_WS_CLASSES . 'box.php'); // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // entry/item info classes require(DIR_WS_CLASSES . 'object_info.php'); // email classes require(DIR_WS_CLASSES . 'mime.php'); require(DIR_WS_CLASSES . 'email.php'); // file uploading class require(DIR_WS_CLASSES . 'upload.php'); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } 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; } // default open navigation box if (!tep_session_is_registered('selected_box')) { tep_session_register('selected_box'); $selected_box = 'configuration'; } if (isset($HTTP_GET_VARS['selected_box'])) { $selected_box = $HTTP_GET_VARS['selected_box']; } // the following cache blocks are used in the Tools->Cache section // ('language' in the filename is automatically replaced by available languages) $cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true), array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true) ); // check if a default currency is set if (!defined('DEFAULT_CURRENCY')) { $messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error'); } // check if a default language is set if (!defined('DEFAULT_LANGUAGE')) { $messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error'); } if (function_exists('ini_get') && ((bool)ini_get('file_uploads') == false) ) { $messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning'); } ?> ************** SESSIONS.PHP ************** <?php /* $Id: sessions.php,v 1.9 2003/06/23 01:20:05 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ if (STORE_SESSIONS == 'mysql') { if (!$SESS_LIFE = get_cfg_var('session.gc_maxlifetime')) { $SESS_LIFE = 1440; } function _sess_open($save_path, $session_name) { return true; } function _sess_close() { return true; } function _sess_read($key) { $qid = tep_db_query("select value from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "' and expiry > '" . time() . "'"); $value = tep_db_fetch_array($qid); if ($value['value']) { return $value['value']; } return false; } function _sess_write($key, $val) { global $SESS_LIFE; $expiry = time() + $SESS_LIFE; $value = $val; $qid = tep_db_query("select count(*) as total from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"); $total = tep_db_fetch_array($qid); if ($total['total'] > 0) { return tep_db_query("update " . TABLE_SESSIONS . " set expiry = '" . tep_db_input($expiry) . "', value = '" . tep_db_input($value) . "' where sesskey = '" . tep_db_input($key) . "'"); } else { return tep_db_query("insert into " . TABLE_SESSIONS . " values ('" . tep_db_input($key) . "', '" . tep_db_input($expiry) . "', '" . tep_db_input($value) . "')"); } } function _sess_destroy($key) { return tep_db_query("delete from " . TABLE_SESSIONS . " where sesskey = '" . tep_db_input($key) . "'"); } function _sess_gc($maxlifetime) { tep_db_query("delete from " . TABLE_SESSIONS . " where expiry < '" . time() . "'"); return true; } session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } function tep_session_start() { return session_start(); } function tep_session_register($variable) { return session_register($variable); } function tep_session_is_registered($variable) { return session_is_registered($variable); } function tep_session_unregister($variable) { return session_unregister($variable); } function tep_session_id($sessid = '') { if ($sessid != '') { return session_id($sessid); } else { return session_id(); } } function tep_session_name($name = '') { if ($name != '') { return session_name($name); } else { return session_name(); } } function tep_session_close() { if (function_exists('session_close')) { return session_close(); } } function tep_session_destroy() { return session_destroy(); } function tep_session_save_path($path = '') { if ($path != '') { return session_save_path($path); } else { return session_save_path(); } } ?> ************** FILENAMES.PHP: ************** <?php /* $Id: filenames.php,v 1.1 2003/06/20 00:18:30 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // define the filenames used in the project define('FILENAME_BACKUP', 'backup.php'); define('FILENAME_BANNER_MANAGER', 'banner_manager.php'); define('FILENAME_BANNER_STATISTICS', 'banner_statistics.php'); define('FILENAME_CACHE', 'cache.php'); define('FILENAME_CATALOG_ACCOUNT_HISTORY_INFO', 'account_history_info.php'); define('FILENAME_CATEGORIES', 'categories.php'); define('FILENAME_CONFIGURATION', 'configuration.php'); define('FILENAME_COUNTRIES', 'countries.php'); define('FILENAME_CURRENCIES', 'currencies.php'); define('FILENAME_CUSTOMERS', 'customers.php'); define('FILENAME_DEFAULT', 'index.php'); define('FILENAME_DEFINE_LANGUAGE', 'define_language.php'); define('FILENAME_FILE_MANAGER', 'file_manager.php'); define('FILENAME_GEO_ZONES', 'geo_zones.php'); define('FILENAME_LANGUAGES', 'languages.php'); define('FILENAME_MAIL', 'mail.php'); define('FILENAME_MANUFACTURERS', 'manufacturers.php'); define('FILENAME_MODULES', 'modules.php'); define('FILENAME_NEWSLETTERS', 'newsletters.php'); define('FILENAME_ORDERS', 'orders.php'); define('FILENAME_ORDERS_INVOICE', 'invoice.php'); define('FILENAME_ORDERS_PACKINGSLIP', 'packingslip.php'); define('FILENAME_ORDERS_STATUS', 'orders_status.php'); define('FILENAME_POPUP_IMAGE', 'popup_image.php'); define('FILENAME_PRODUCTS_ATTRIBUTES', 'products_attributes.php'); define('FILENAME_PRODUCTS_EXPECTED', 'products_expected.php'); define('FILENAME_REVIEWS', 'reviews.php'); define('FILENAME_SERVER_INFO', 'server_info.php'); define('FILENAME_SHIPPING_MODULES', 'shipping_modules.php'); define('FILENAME_SPECIALS', 'specials.php'); define('FILENAME_STATS_CUSTOMERS', 'stats_customers.php'); define('FILENAME_STATS_PRODUCTS_PURCHASED', 'stats_products_purchased.php'); define('FILENAME_STATS_PRODUCTS_VIEWED', 'stats_products_viewed.php'); define('FILENAME_TAX_CLASSES', 'tax_classes.php'); define('FILENAME_TAX_RATES', 'tax_rates.php'); define('FILENAME_WHOS_ONLINE', 'whos_online.php'); define('FILENAME_ZONES', 'zones.php'); define('FILENAME_RELATED_PRODUCTS', 'optional_related_products.php'); ?> ************** Thanks for your so promptly response - that is highly appreciated :)
  3. I am getting a few errors on the main page:  Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/anything/public_html/x/includes/application_top.php:1) in /home/anything/public_html/x/includes/functions/sessions.php on line 97 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/anything/public_html/x/includes/application_top.php:1) in /home/anything/public_html/x/includes/functions/sessions.php on line 97 and the following code in the admin section: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/anything/public_html/x/admin/categories.php:1) in /home/anything/public_html/x/admin/includes/functions/sessions.php on line 67 as well as these errors when I enter the Related Products under Admin: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/anything/public_html/x/admin/includes/filenames.php:1) in /home/anything/public_html/x/admin/includes/functions/sessions.php on line 67  Warning: Cannot modify header information - headers already sent by (output started at /home/anything/public_html/x/admin/includes/filenames.php:1) in /home/anything/public_html/x/admin/includes/functions/general.php on line 22 I have no other contributions added, so there should not be anything wrong, right? If you can guide me in the right direction, I would appreciate it very much :) Thanks.
  4. daniaw

    Attribute Sets Contribution

    Sorry for the delay in getting back here! The resolution to the problem of getting the error certainly is to change it to TEXT, then delete the Attribute Set you just created, THEN re-create it, and the SQL is now working perfectly, and so is the Attribute Set with a multitude of codes.
  5. daniaw

    Attribute Sets Contribution

    Thanks for the SUPERFAST reply, Joey: The code from phpMyAdmin ver. 2.5.6: 1/1/+/2.00_1/2/+/2.00_1/3/+/2.00_1/4/+/2.00_1/5/+/2.00_1/6/+/2.00_1/7/+/2.00_1/8/+/2.00_1/9/+/2.00_1/10/+/2.00_1/11/+/2.00_1/12/+/2.00_1/13/+/2.00_1/14/+/2.00_1/15/+/2.00_1/16/+/2.00_1/17/+/2.00_1/18/+/2.00_1/19/+/6.00_1/20/+/6.00_1/21/+/6.00_1/22/+/6.00_ The field for products_attributes_sets_value I already changed to Text, as that idea was mentioned earlier, but that didn't resolve the problem. Now - maybe this will help (just an idea) - should I take out the first set, then recreate the set again, in order to put the Text into working order??? Thanks again Joey - you are "da man" :)
  6. daniaw

    Attribute Sets Contribution

    Dear all! I have gotten a couple of emails with suggestions to browse the forum for assistance. THAT DOESN'T HELP ME! The error that I am getting (shown below) is DIFFERENT from all the other errors that LOOKS like this error. 1064 - 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 ''')' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix) values (46,1,1,,'') [TEP STOP] As far as I understand though, the problem might relate to how many options are in the attribute set. I have created an option for colors, and there are 23 colors in there as of now. More to come? I am not sure! These are all put into one Attribute Set (one drop-down if you will), and it's here the SQL is making it's hickups according to posts on similar cases. I am not a SQL-kinda-guy, but do have access to the SQL through phpMyAdmin - any suggestions on what to do in there to fix this problem? I don't see the problem until trying to add a new product. Everything appears fine until I hit Insert - then the code above comes on the screen. What's worse is that it actually ads the image to my site, but when you click on it, it doesn't exist. Furthermore, when attempting to locate it via the admin console, it doesn't exist in there either. BUT the picture is STILL on my front page of osCommerce... H E L P P L E A S E
  7. Followed the directions for version 2.0 of Jul 31 2004. Everything ran fine until trying to add a new product. Then I get the following error: 1064 - 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 ',,'')' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix) values (3,,,,'') [TEP STOP] Anyone here who has an idea of where to look to fix the error? Thank you in advance!!!
  8. daniaw

    Attribute Sets Contribution

    Followed the directions for version 2.0 of Jul 31 2004. Everything ran fine until trying to add a new product. Then I get the following error: 1064 - 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 ',,'')' at line 1 insert into products_attributes (products_id, options_id, options_values_id, options_values_price, price_prefix) values (3,,,,'') [TEP STOP] Anyone here who has an idea of where to look to fix the error? Thank you in advance!!!
  9. daniaw

    Attribute Sets Contribution

    I am sorry that I put down that I replaced the database file - I didn't do that after all. I copied everything in your file, then found the ?> part and pasted everything from your file into the existing part before the ?>. I have PM it to you, and I highly appreciate all your efforts in staying on top of your contribution. Man, that is a rare case!!! 10 thumbs up!!!
  10. daniaw

    Attribute Sets Contribution

    I have looked at that notification already - it is not the exact same error. The database page is one whole page - I copied and pasted the whole thing over, as suggested by your guidelines. Any other suggestions? Thanks
  11. daniaw

    Attribute Sets Contribution

    Joey, I like the features of your contribution alot, however, I am getting this error when in the admin console: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home2/decalguy/public_html/commerce/admin/includes/database_tables.php:62) in /home2/decalguy/public_html/commerce/admin/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home2/decalguy/public_html/commerce/admin/includes/database_tables.php:62) in /home2/decalguy/public_html/commerce/admin/includes/functions/sessions.php on line 67 Now - I haven't done any editing to sessions.php, so not sure of why it's doing this to me :( I have tried updating the files as specified in your directions twice, and I can't get this out of the way. I do see your Attributes Sets, and I can add a new set, but I cannot modify existing Product Attributes nor add or delete, as I am getting this wonderful error: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home2/decalguy/public_html/commerce/admin/includes/database_tables.php:62) in /home2/decalguy/public_html/commerce/admin/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home2/decalguy/public_html/commerce/admin/includes/database_tables.php:62) in /home2/decalguy/public_html/commerce/admin/includes/functions/sessions.php on line 67 Warning: Cannot modify header information - headers already sent by (output started at /home2/decalguy/public_html/commerce/admin/includes/database_tables.php:62) in /home2/decalguy/public_html/commerce/admin/includes/functions/general.php on line 18 Any ideas?
  12. daniaw

    Sales Tax

    Hi there. This is my - huh-humm - attempt to obtain information on how to configure sales tax in osCommerce for the US. Anyone out there who has a solution?
  13. daniaw

    banner manager by audry@mycon.co.za

    Just wondering what the "right" group might be? I removed the default banner, installed new banners, and they worked for a brief moment, and now they don't work at all :(
×