problem with paths
#1
Posted 06 January 2010, 17:24
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
Posted 06 January 2010, 17:54
Most Important: Header Tags SEO - Ultimate SEO V 2.2d
All SEO Addons: Recommended SEO Addons
Support Links:
Finding relevant link exchanges - Headers Already Sent - What does it cost? -What's my version? - How to change titles? - Preventing HotLinking
#3
Posted 06 January 2010, 18:28
Jack_mcs, on 06 January 2010, 17:54, said:
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
Posted 06 January 2010, 18:34
#5
Posted 06 January 2010, 18:41
mdtaylorlrim, on 06 January 2010, 18:34, said:
https://squaredealfarm.org/osCommerce/catalog
Thanks,
Ray
#6
Posted 06 January 2010, 18:56
squarede, on 06 January 2010, 18:41, said:
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.
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
Posted 06 January 2010, 19:12
<?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
Posted 06 January 2010, 19:35
squarede, on 06 January 2010, 19:12, said:
<?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');
?>
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
Posted 06 January 2010, 19:42
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
Posted 06 January 2010, 19:47
squarede, on 06 January 2010, 19:42, said:
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.
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
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
Posted 06 January 2010, 20:38
squarede, 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.
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
Posted 06 January 2010, 21:40
FWR Media, on 06 January 2010, 20:38, said:
<?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
Posted 06 January 2010, 21:50
squarede, on 06 January 2010, 21:40, said:
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');
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
Posted 06 January 2010, 22:23
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
Posted 06 January 2010, 22:48
squarede, on 06 January 2010, 22:23, said:
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/
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
Posted 06 January 2010, 22:53
Ray
#18
Posted 06 January 2010, 23:00
Edited by FWR Media, 06 January 2010, 23:01.
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
Posted 06 January 2010, 23:00
squarede, on 06 January 2010, 22:53, said:
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.
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.














