Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

problem with paths


18 replies to this topic

#1 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 17:24

I have just migrated my site to a new server and am having a very frustrating problem with my product paths that i can not figure out.
Everything about my site works fine EXCEPT when I try to open a catalog page the site attempts to log on to a page that has a duplicate website address listed in the browser bar like this - https://squaredealfarm.org/osCommerce/catalog/squaredealfarm.org/osCommerce/catalog/?cPath=28&osCsid=pai6u5tdbrbutq6uu97ng9e3u4 - I would appreciate any help tracking this down.
Thanks,
Ray

#2 Jack_mcs

  • Community Member
  • 24,449 posts
  • Real Name:Jack
  • Gender:Male

Posted 06 January 2010, 17:54

It's most likely due to your includes/configure.php file not being setup correctly. This thread explains how to set it up.

#3 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 18:28

View PostJack_mcs, on 06 January 2010, 17:54, said:

It's most likely due to your includes/configure.php file not being setup correctly. This thread explains how to set it up.

Thanks Jack, I have been pouring over the 2 config files for two days trying different set ups -to no avail. The problem seems simple, but really has me stumped
Ray

#4 mdtaylorlrim

  • Community Member
  • 2,497 posts
  • Real Name:Mark
  • Gender:Male

Posted 06 January 2010, 18:34

It would help us if we had your site address so we could see it for ourselves.
Avoid the most asked question. See How to Secure My Site and How do I...?

#5 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 18:41

View Postmdtaylorlrim, on 06 January 2010, 18:34, said:

It would help us if we had your site address so we could see it for ourselves.
so sorry, I thought I posted it above:

https://squaredealfarm.org/osCommerce/catalog

Thanks,
Ray

#6 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 18:56

View Postsquarede, on 06 January 2010, 18:41, said:

so sorry, I thought I posted it above:

https://squaredealfarm.org/osCommerce/catalog

Thanks,
Ray

As long as you are using tep_href_link and not hardcoded html links I'm certain it is your includes/configure.php file .. post it here but leave out the private DB information and XXX out the server path.

As an addition it is madness to have a whole site run on https .. it is very slow .. hard for bots to index and thoroughly unnecessary.

Edited by FWR Media, 06 January 2010, 18:56.

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#7 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 19:12

Here is our configure file.

<?php
define('HTTP_SERVER', 'squaredealfarm.org');
define('HTTPS_SERVER', 'https://squaredealfarm.org');
define('ENABLE_SSL', true);
define('HTTP_COOKIE_DOMAIN', 'squaredealfarm.org');
define('HTTPS_COOKIE_DOMAIN', 'https://squaredealfarm.org');
define('HTTP_COOKIE_PATH', '/osCommerce/catalog/');
define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/');
define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/osCommerce/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', '/web/squaredealfarm.org/www/osCommerce/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

define('DB_SERVER', 'xxxxxxxxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxxxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>

Robert, We have never run our site on a ssl before, but a hack is what lead us down this path of having to rebuild and I am a little gun shy now that we are going live again.

Thanks for your help.

Ray

#8 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 19:35

View Postsquarede, on 06 January 2010, 19:12, said:

Here is our configure file.

<?php
define('HTTP_SERVER', 'squaredealfarm.org');
define('HTTPS_SERVER', 'https://squaredealfarm.org');
define('ENABLE_SSL', true);
define('HTTP_COOKIE_DOMAIN', 'squaredealfarm.org');
define('HTTPS_COOKIE_DOMAIN', 'https://squaredealfarm.org');
define('HTTP_COOKIE_PATH', '/osCommerce/catalog/');
define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/');
define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/osCommerce/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', '/web/squaredealfarm.org/www/osCommerce/catalog/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

define('DB_SERVER', 'xxxxxxxxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxxxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>

Robert, We have never run our site on a ssl before, but a hack is what lead us down this path of having to rebuild and I am a little gun shy now that we are going live again.

Thanks for your help.

Ray

The path didn't look right in DIR_FS_CATALOG so I replaced it with (what I believe to be) a platform independent dynamic replacement (this should really be a full path).

<?php
define('HTTP_SERVER', 'http://squaredealfarm.org');
define('HTTPS_SERVER', 'https://squaredealfarm.org');
define('ENABLE_SSL', false);
define('HTTP_COOKIE_DOMAIN', '.squaredealfarm.org');
define('HTTPS_COOKIE_DOMAIN', '.squaredealfarm.org');
define('HTTP_COOKIE_PATH', '/osCommerce/catalog/');
define('HTTPS_COOKIE_PATH', '/osCommerce/catalog/');
define('DIR_WS_HTTP_CATALOG', '/osCommerce/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/osCommerce/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', str_replace( DIRECTORY_SEPARATOR, '/', realpath( '.' ) ) . '/' );
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

define('DB_SERVER', 'xxxxxxxxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxxxxxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxxxx');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'mysql');
?>

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#9 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 19:42

Robert- Thank you for looking at this. The path is indeed correct, but i was finally able to address this by changing the

define('HTTP_SERVER', 'http://squaredealfarm.org');

to

define('HTTP_SERVER', 'squaredealfarm.org');

that seemed to do the trick and I am off and running. thank you again,

Ray

#10 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 19:47

View Postsquarede, on 06 January 2010, 19:42, said:

Robert- Thank you for looking at this. The path is indeed correct, but i was finally able to address this by changing the



to

define('HTTP_SERVER', 'squaredealfarm.org');

that seemed to do the trick and I am off and running. thank you again,

Ray

Well that is wrong Ray .. it should be ..

define('HTTP_SERVER', 'http://squaredealfarm.org');

If that doesn't work then you have made allowances for the incorrect entry in function tep_href_link() which I would advise you to change back to standard.

Edited by FWR Media, 06 January 2010, 19:47.

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#11 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 20:19

?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle" align="center"> <?php echo '<a href="http://squaredealfarm.org"' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'SDFLOGO.jpg', 'Square Deal Farm') . '</a>'; ?></td>

</tr>

Robert is this code from header.php what you are referring to? I did change this to allow my logo to appear at the top of the page and also be a link back to my home page.

http://squaredealfarm.org/osCommerce/catalog

Thanks,
Ray

#12 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 20:38

View Postsquarede, on 06 January 2010, 20:19, said:

?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle" align="center"> <?php echo '<a href="http://squaredealfarm.org"' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'SDFLOGO.jpg', 'Square Deal Farm') . '</a>'; ?></td>

</tr>

Robert is this code from header.php what you are referring to? I did change this to allow my logo to appear at the top of the page and also be a link back to my home page.

http://squaredealfarm.org/osCommerce/catalog

Thanks,
Ray

Well that is a very good example of wrong Ray yes .. it should be just ..
<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'SDFLOGO.jpg', 'Square Deal Farm') . '</a>'; ?>

The tep_href_link(FILENAME_DEFAULT) will produce ..

http://squaredealfarm.org/index.php

Edited by FWR Media, 06 January 2010, 20:39.

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#13 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 21:40

View PostFWR Media, on 06 January 2010, 20:38, said:

Well that is a very good example of wrong Ray yes .. it should be just ..
<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'SDFLOGO.jpg', 'Square Deal Farm') . '</a>'; ?>

The tep_href_link(FILENAME_DEFAULT) will produce ..

http://squaredealfarm.org/index.php

Robert, since I am a farmer rather than a programmer and tend to take the baling wire and duct tape approach on anything but machinery, I am sure that you are correct.

However, I did try your code and could not get it to work. Since my code works, would you please explain why it is wrong?

Thank you, Ray

#14 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 21:50

View Postsquarede, on 06 January 2010, 21:40, said:

Robert, since I am a farmer rather than a programmer and tend to take the baling wire and duct tape approach on anything but machinery, I am sure that you are correct.

However, I did try your code and could not get it to work. Since my code works, would you please explain why it is wrong?

Thank you, Ray

Don't know about baling wire but duct tape and WD40 are the answers to the problems of the universe .. everyone knows that .. even techies :)

Jokes aside it is just that HTTP_SERVER and HTTPS_SERVER should always have the full http address e.g.
define('HTTP_SERVER', 'http://squaredealfarm.org');
define('HTTPS_SERVER', 'https://squaredealfarm.org');

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#15 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 22:23

OK Robert, that works, and thanks you for your explanation, patience and assistance.

One question. I actually want the image to link to http://squaredealfarm.org. However, the link now points to http://squaredealfarm.org/osCommerce/catalog. I'm sure that you know why this is happening -care to share?
Ray

#16 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 22:48

View Postsquarede, on 06 January 2010, 22:23, said:

OK Robert, that works, and thanks you for your explanation, patience and assistance.

One question. I actually want the image to link to http://squaredealfarm.org. However, the link now points to http://squaredealfarm.org/osCommerce/catalog. I'm sure that you know why this is happening -care to share?
Ray

The image link is based on the shop link so if the shop link is ..

http://squaredealfarm.org/osCommerce/catalog/

the image link must be (as the above is the root of your site and the image folder within it) ..

http://squaredealfarm.org/osCommerce/catalog/images/
Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#17 squarede

  • Community Member
  • 22 posts
  • Real Name:Ray Lewis
  • Location:Walden, Vermont

Posted 06 January 2010, 22:53

Thank you Robert.
Ray

#18 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 23:00

** duplicate real post below **

Edited by FWR Media, 06 January 2010, 23:01.

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.


#19 FWR Media

  • Community Member
  • 6,463 posts
  • Real Name:Robert Fisher
  • Gender:Male
  • Location:Stowmarket - Suffolk - UK

Posted 06 January 2010, 23:00

View Postsquarede, on 06 January 2010, 22:53, said:

Thank you Robert.
Ray

My pleasure Ray

Oh and in the "answers to the problems of the universe" I omitted mole clamps which surely was remiss of me :)

(you never choose to use them but always end up doing so)

Edited by FWR Media, 06 January 2010, 23:03.

Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls

KissMT Dynamic SEO Meta & Canonical Header Tags

KissER Error Handling and Debugging

If you found my post useful please click the green + sign to the right

Please only PM me for paid work.