Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help.. code not getting the right variables!!


melveile

Recommended Posts

Posted

when i view source for my index.php file (the html source seen in the webbrowser) it says:

 

<base href="">

 

instead of:

<base href="http://www.mysite.com/catalog/">

 

in index.php it says

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

I couldn't even find the variable DIR_WS_CATALOG in the configure.php file and it seems not to be taking HTTPS_SERVER & HTTP_SERVER variables.

 

When i wrote DIR_WS_CATALOG in configure.php it was processed by index.php, but

still no HTTPS_SERVER & HTTP_SERVER variables. If i just write in

define('DIR_WS_CATALOG;', 'http://www.mysite.com/catalog/');

in configure.php will that affect adversely any other files?

 

I tried to reinstall several times on this website. I also have another website hosted on the same server/ipaddress where it works fine, so i copied the catalog dir and replaced the name and database login in all php files. When i uploaded it back to the first site still the same error!!! Is this an install problem?

 

Any help will be greatly appreciated,

Thanx

Posted

There are 2 configure.php files. One in admin/includes and one in catalog/includes.

 

DIR_WS_CATALOG resides in the admin/includes/configure.php file.

HTTPS_SERVER & HTTP_SERVER reside in the catalog/includes/configure.php file.

 

Check your settings in both files for the appropriate entries.

I'd rather be flying!

Posted

both files have HTTPS_SERVER & HTTP_SERVER variables and both of them are defined correctly . HTTP_SERVER points to the full path of my website http dir and HTTPS is blank because SSL is not enabled ( define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module)

 

 

There is a variable in the admin/includes/configure.php:

 

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

 

but it is not read by the index.php and all the other files that have the base href="" tag in the html code.

 

I could fix this by hand by substituting a correct tempfix variable with the full path to the catalog dir in all the files with base href="" tag, but i'm wondering if this isn't working corectly what else am i missing. I don't want to have other problems once my store goes live.

 

Also, as i mentioned above, this is the EXACT COPY of entire catalog with correctly substituted website and database name that resides on a different website but on the same server (exact same setting etc). That one has the correct base tag.

 

Thanx

Posted

includes/configure.php

 

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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.mysite.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.mysite.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('TEMPFIX_DIR_WS_CATALOG', 'http://www.mysite.com/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', '/usr/local/psa/home/vhosts/mysite.com/httpdocs/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', '');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

 

amind/includes/configure.php

 

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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.mysite.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.mysite.com');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/usr/local/psa/home/vhosts/aloegift.com/httpdocs/catalog/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/usr/local/psa/home/vhosts/mysite.com/httpdocs/catalog/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/catalog/'); // absolute path required
 define('DIR_FS_CATALOG', '/usr/local/psa/home/vhosts/mysite.com/httpdocs/catalog/'); // absolute path required
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', '');
 define('DB_SERVER_PASSWORD', '');
 define('DB_DATABASE', '');
 define('USE_PCONNECT', 'false'); // use persisstent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

 

 

The temp fix dir is the one i substituted as a temporary fix to see if the front page will load if i ad a variable with the path there:

define('TEMPFIX_DIR_WS_CATALOG', 'http://www.mysite.com/catalog/');

 

so my index.php file looks like:

<base href="<?php echo TEMPFIX_DIR_WS_CATALOG; ?>">

 

 

 

if you wanna see the website for yourself, pm or email me

 

 

Thanx,

mel

Posted

It's not working again!!!

 

 

It was working yesterday when i figured that i forgot to upload .htaccess files that are located in a few direcotories that didn't show up in my ftp browser so i didn't back them up when i made a copy. I uploaded all of them yesterday by hand, and it started working.

 

Today when i woke up it wasn't working again!! I reinstalled the entire thing from the original oscommerce download (with all the correct .htaccess files) and still it doesn't work on this site!

 

Please help

 

 

If you would like to see for yourself, go to http://www.aloegift.com/catalog/ with internet explorer.... My IE doesn't pick up any images or css files due to base href="" tag

Archived

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

×
×
  • Create New...