Jump to content

Archived

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

Roaddoctor

xampp and configure.php

Recommended Posts

Just installed xampp for the first time and have it seemingly working ok. Have one odd issue and I believe its likely that one of the configure.php is wrong.

 

in the breadcrumb, where "Top -> Catalog" are

Clicking Catalog is fine, goes to http://localhost/catalog/index.php

Clicking Top is broken, goes to http://localhost/xampp/

 

The full path is E:/xampp/htdocs/catalog/

Does anyone see any issue with the configs? osC 2.3.3.4

 

catalog

  define('HTTP_SERVER', 'http://localhost');
  define('HTTPS_SERVER', 'https://localhost');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
  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_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', 'E:/xampp/htdocs/catalog/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

admin

  define('HTTP_SERVER', 'http://localhost');
  define('HTTP_CATALOG_SERVER', 'http://localhost');
  define('HTTPS_CATALOG_SERVER', 'https://localhost');
  define('ENABLE_SSL_CATALOG', 'false');
  define('DIR_FS_DOCUMENT_ROOT', 'E:/xampp/htdocs/catalog/');
  define('DIR_WS_ADMIN', '/catalog/xxxadminxxx/');
  define('DIR_FS_ADMIN', 'E:/xampp/htdocs/catalog/xxxadminxxx/');
  define('DIR_WS_CATALOG', '/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/catalog/');
  define('DIR_FS_CATALOG', 'E:/xampp/htdocs/catalog/');
  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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Thx in advance


-Dave

Share this post


Link to post
Share on other sites

Not sure on local server

 

"Top -> Catalog"

 

 Top is defined in application_top.php

 

so just remove ?

 

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

I see in application_top

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

So I guess my question is why HTTP _SERVER isnt working within xampp with the above configs. Did I perhaps miss somethng in xampp setup?


-Dave

Share this post


Link to post
Share on other sites

Is there something in the root that is redirecting you to /xampp/? I seem to remember that there was, but it's been years since I've used it. Look for a index.php, index.html, or .htaccess file with a redirect.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Try to use this..

  define('HTTP_SERVER', 'http://127.0.0.1');
  define('HTTPS_SERVER', 'http://127.0.0.1');


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Sort of found a solution. As Jim mentioned, there is an index.php in the root directory /htdocs/ with this

<?php
	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
		$uri = 'https://';
	} else {
		$uri = 'http://';
	}
	$uri .= $_SERVER['HTTP_HOST'];
//	header('Location: '.$uri.'/xampp/');
    header('Location: '.$uri.'/catalog/');
	exit;
?>
Something is wrong with the XAMPP installation :-(

made the change above and that sorts the "Top / HTTP_SERVER" concern. Only negative consequence is that the Admin button in xampp control panel now takes me to the shop instead of /xampp/.. but its easy eneogh to just type localhost/xampp/ when needed.


-Dave

Share this post


Link to post
Share on other sites

You could replace that file with one containing links to /xampp/ and to /catalog/. That way you don't have to remember to type the directory name.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Hello David @@Roaddoctor,

 

Just tried this and it works for me:

 

  define('HTTP_SERVER', 'http://localhost/catalog');
  define('HTTPS_SERVER', 'https://localhost/catalog');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '');
  define('HTTPS_COOKIE_DOMAIN', '');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
regards

Rainer

Share this post


Link to post
Share on other sites

Hello OSC folks :thumbsup:

I would appreciate any feedback on this.  I'm pretty lost right now.

 

Fresh OSC 2.3.4 install on my host server (Linux, Apache 2.2, PhP 5.3, MySQL 5.5) works great.

FTP down and attempting to get up on local machine for testing using XAMPP (Windows, Apache 2.4, PhP 5.5. MySQL 5.6)

 

Basically what I'm seeing at the store front is only the center section listing new products for July! (but the product images are missing here as they are throughout the entire store) Also missing both left and right sidebars (Categories, Manufacturer's, Quick Find, etc.)  I do have the Cart and Checkout Buttons at top right.  Also the breadcrumb trail appears at top and works throughout store.

 

Right click and view image info for missing product image shows (http://127.0.0.1/images/dvd/courage_under_fire.gif

Soooo /catalog missing somewhere?  Yes probably, but everything I've tried in configure.php except the following ends up breaking all navigation from storefront (land on 404 for all links) and images still don't show up.

 

includes/configure.php

 

<?php
  define('HTTP_SERVER', 'http://127.0.0.1/catalog');
  define('HTTPS_SERVER', 'https://127.0.0.1/catalog');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_IMAGES', '/images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . '/icons/');
  define('DIR_WS_INCLUDES', '/includes/');
  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', 'c:/xampp/htdocs/catalog/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/pub/');

  define('DB_SERVER', '127.0.0.1');
  define('DB_SERVER_USERNAME', '****');
  define('DB_SERVER_PASSWORD', '********');
  define('DB_DATABASE', 'oscommerce_**********');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'UTC');
?>

 

admin/includes/configure.php

 

<?php
  define('HTTP_SERVER', 'http://127.0.0.1/catalog');
  define('HTTPS_SERVER', 'https://127.0.0.1/catalog');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '/admin');
  define('HTTPS_COOKIE_PATH', '/admin');
  define('HTTP_CATALOG_SERVER', '127.0.0.1');
  define('HTTPS_CATALOG_SERVER', '127.0.0.1');
  define('ENABLE_SSL_CATALOG', 'false');
  define('DIR_FS_DOCUMENT_ROOT', 'c:/xampp/htdocs/');
  define('DIR_WS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_FS_ADMIN', 'c:/xampp/htdocs/catalog/admin/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_FS_CATALOG', 'c:/xampp/htdocs/catalog/');
  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('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/pub/');

  define('DB_SERVER', '127.0.0.1');
  define('DB_SERVER_USERNAME', '****');
  define('DB_SERVER_PASSWORD', '********');
  define('DB_DATABASE', 'oscommerce_**********');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'UTC');
?>

 

Here's my index.php.  Not sure if this relevant. 

 

<?php
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        $uri = 'https://';
    } else {
        $uri = 'http://';
    }
    $uri .= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/xampp/');
    exit;
?>
Something is wrong with the XAMPP installation :-(

 

 

Added this just in case....

 

xampp/apache/conf/httpd.conf

<Directory "c:/xampp/htdocs/">
   AllowOverride Options
 </Directory>

 

And one last thing...this error appearing at top of store front..

Warning: file(/includes/spiders.txt): failed to open stream: No such file or directory in C:\xampp\htdocs\catalog\includes\application_top.php on line 173

 

Here's that section from my application_top.php

 

// 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');   <------- line 173

      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;
          }

 

 

Thanks for any suggestions!

Sylla

Share this post


Link to post
Share on other sites

These are my first posts here so please forgive the noobness.  Didn't see a way to edit or delete my previous post. 

 

My product images are now showing up throughout store.  Compared to my previous post these are changes to my configure.php.
 

  define('HTTP_COOKIE_DOMAIN', 'http://127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', 'https://127.0.0.1');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
  define('DIR_WS_IMAGES', '/catalog/images/');

 

Still missing the sidebars on the store front.  None of the boxes there and center section of store spans fully across.

Also still getting missing file warning (spiders.txt) from application_top.php.  [Am I guessing right that this is a cookie define issue?]

 

Regards,

Sylla

Share this post


Link to post
Share on other sites

Try this:
 

  define('HTTP_SERVER', 'http://127.0.0.1');
  define('HTTPS_SERVER', 'https://127.0.0.1');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
  define('DIR_WS_HTTP_CATALOG', '/catalog/');
  define('DIR_WS_HTTPS_CATALOG', '/catalog/');
  define('DIR_WS_IMAGES', 'images/');



Regards
Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Thanks Jim,

 

Yep that works for the product images and seems a more straightforward approach. Very cool.

 

I tried it with  "/images/" instead of "images/" and did not work.  Big surprise to me. Glad to be aware of this subtlety.  Looks like I have some basic basics to learn here.  Perhaps will solve my other issues.

 

Thanks again,

sylla

Share this post


Link to post
Share on other sites

×