Jump to content



Photo
* * * * * 4 votes

What is the osCsid & why you must not loose it.


This topic has been archived. This means that you cannot reply to this topic.
206 replies to this topic

#21   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 21:01

Whoa no good. Did as you suggested and the page loads with a whole bunch of errors and with a whole bunch of /.../...catalog not found messages.

#22   spooks

spooks
  • Members
  • 7,017 posts

Posted 19 March 2009 - 21:55

you seem to have a strange site then??

To clarify tep_href_link uses HTTP_SERVER and DIR_WS_HTTP_CATALOG or ssl versions



Can you give the precise error shown & perhaps a url?

Is it a template?
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#23   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 22:26

No template. The website can be view here and no SSL yet. Note that I don't have to type "www" in the url for the website.

Okay what I did was to remove all references to catalog in both files. So as an example this is what it looked like for the catalog/includes/configure.php

<?php
  define('HTTP_SERVER', 'http://website url');
  define('HTTPS_SERVER', 'http://website url');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', 'website url');
  define('HTTPS_COOKIE_DOMAIN', 'website url');
  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_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', '/home/servername/public_html/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
 ?>

and for the admin/includes/configure

<?php
  define('HTTP_SERVER', 'http://website url');
  define('HTTPS_SERVER', 'http://website url');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', 'website url');
  define('HTTPS_COOKIE_DOMAIN', 'website url');
  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_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', '/home/servername/public_html/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
 ?>

Are the amendments correct? If yes, I'll try uploading again and see what errors and post them here.

#24   spooks

spooks
  • Members
  • 7,017 posts

Posted 19 March 2009 - 22:42

No, why do you think u have a root site, you have a catalog based site, so u must not remove catalog/

I hope u realise u must replace servername with that for your server

so

'DIR_WS_HTTP_CATALOG'

is iether

define('DIR_WS_HTTP_CATALOG', '/servername/');

or in your case

define('DIR_WS_HTTP_CATALOG', '/servername/catalog/');

Edited by spooks, 19 March 2009 - 22:43.

Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#25   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 22:48

Okay I see. I'll try again this time bearing in mind that it's not at root. I'll report back here if there are any errors.

Thanks Sam.

#26   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 23:08

Well no good still. Page loads but no stylesheet at all. And I only change one line in the catalog/includes/configure.php and that was as follows:

define('DIR_WS_HTTP_CATALOG', '/servername/catalog/');

And yes, I did change "servername" to my server. When I take away the "servername" from that line of code, everything is normal!! Completely lost at this point!!!

#27   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 23:13

Well no good still. Page loads but no stylesheet at all. And I only change one line in the catalog/includes/configure.php and that was as follows:

define('DIR_WS_HTTP_CATALOG', '/servername/catalog/');

And yes, I did change "servername" to my server. When I take away the "servername" from that line of code, everything is normal!! Completely lost at this point!!!

#28   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 23:13

Well no good still. Page loads but no stylesheet at all. And I only change one line in the catalog/includes/configure.php and that was as follows:

define('DIR_WS_HTTP_CATALOG', '/servername/catalog/');

And yes, I did change "servername" to my server. When I take away the "servername" from that line of code, everything is normal!! Completely lost at this point!!!

#29   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 23:13

Well no good still. Page loads with no stylesheet at all. And I only change one line in the catalog/includes/configure.php and that was as follows:

define('DIR_WS_HTTP_CATALOG', '/servername/catalog/');

And yes, I did change "servername" to my server. When I take away the "servername" from that line of code, everything is normal!! Completely lost at this point!!!

#30   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 19 March 2009 - 23:18

Apologies, how do I delete post? Just noticed the many entries!!!!! Please moderator, kindly delete the multiple postings.

#31   spooks

spooks
  • Members
  • 7,017 posts

Posted 20 March 2009 - 00:35

It seems you have other un-related errors, or are creating new as u edit!!

config has nothing to do with css

go over your site more carefully, I hope you're not using filemanager to edit!!!!

I think its time u took this to a new thread as your errors are specific to your site & not related to sid issues.

Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#32   ivyfleur

ivyfleur
  • Members
  • 88 posts

Posted 20 March 2009 - 00:50

Thanks Sam for the response.

I use Notepad++ to do the editing and comparing. Okay I'll go over the site again carefully and will create a new topic if necessary.

Thanks once again.

#33   steve_s

steve_s
  • Members
  • 1,580 posts

Posted 21 March 2009 - 16:56

Hi Sam,

Hope you can help ive followed you guide, but im getting a different seesion id to one assigned im using tep_href_link function ?
<?php

require('includes/application_top.php');

  function getSuggestions($keyword)
  {
  global $languages_id;
	// escape the keyword string	  
	$patterns = array('/"+/', '/%+/');
	//$patterns = array('/\s+/', '/"+/', '/%+/');
	$replace = array('');
	$keyword = preg_replace($patterns, $replace, $keyword);
	$keyword = tep_db_input($keyword);
	// build the SQL query that gets the matching functions from the database
	if($keyword != '')
	  $query = 'SELECT products_name, products_id ' .
			   'FROM products_description ' . 
			   'WHERE LOWER(products_name) LIKE "' . strtolower($keyword) . '%" and language_id = "'.$languages_id.'"';
	// if the keyword is empty build a SQL query that will return no results
	else
	  $query = 'SELECT products_name ' .
 
			   'FROM products_description ' .
			   'WHERE products_name !="" and language_id = "'.$languages_id.'"'; 
	// execute the SQL query
	$result = tep_db_query($query);
	// build the XML response
	$output = '<?xml version="1.0" encoding="'.CHARSET.'" standalone="yes"'.'?'.'>';
	$output .= '<response>';
	// if we have results, loop through them and add them to the output
	if(tep_db_num_rows($result)>0)
	  while ($row = tep_db_fetch_array($result))
	  {  
		$output .= '<name>' . htmlentities($row['products_name'], ENT_QUOTES) . '</name>';
		$output .= '<url>' . tep_href_link(FILENAME_PRODUCT_INFO. '?products_id='.(int)$row['products_id'],'',NONSSL,true,false) . '</url>';
	  }
	// close the result stream 
	// add the final closing tag
	$output .= '</response>';   
	// return the results
	return $output;  
  }

Edited by steve_s, 21 March 2009 - 16:56.


#34   spooks

spooks
  • Members
  • 7,017 posts

Posted 21 March 2009 - 17:21

You must use the function as designed!!

You are adding params to the name instead of putting them in the correct place!!

tep_href_link(FILENAME_PRODUCT_INFO. '?products_id='.(int)$row['products_id'],'',NONSSL,true,false)

should be

tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='.(int)$row['products_id'],NONSSL,true,false)

Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#35   germ

germ
  • Members
  • 13,921 posts

Posted 21 March 2009 - 18:59

For all you "noobs" out there who have violated protocol and lost your osCsid I have a few extra that can be provided on a "first come - first served" basis.

These have reinforced attachments and are highly unlikely to ever fall off.

Losing the osCsid does have other ramifications.

They are electrically charged and do pose an electrocution hazard if you "surf" into one.

PLUS, there is a "no littering" policy in force in cyberspace and as the responsible webmaster you could be slapped with a littering fine by the EPA (Electronic Protection Agency).
/ohmy.gif' class='bbc_emoticon' alt=':o' />
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#36   steve_s

steve_s
  • Members
  • 1,580 posts

Posted 21 March 2009 - 19:16

You must use the function as designed!!

You are adding params to the name instead of putting them in the correct place!!

tep_href_link(FILENAME_PRODUCT_INFO. '?products_id='.(int)$row['products_id'],'',NONSSL,true,false)

should be

tep_href_link(FILENAME_PRODUCT_INFO, 'products_id='.(int)$row['products_id'],NONSSL,true,false)


Thanks but due to the java return doesnt work, i shall keep trying

#37   spooks

spooks
  • Members
  • 7,017 posts

Posted 03 April 2009 - 15:01

For all you "noobs" out there who have violated protocol and lost your osCsid I have a few extra that can be provided on a "first come - first served" basis.

These have reinforced attachments and are highly unlikely to ever fall off.

Losing the osCsid does have other ramifications.

They are electrically charged and do pose an electrocution hazard if you "surf" into one.

PLUS, there is a "no littering" policy in force in cyberspace and as the responsible webmaster you could be slapped with a littering fine by the EPA (Electronic Protection Agency).
/ohmy.gif' class='bbc_emoticon' alt=':o' />


/laugh.gif' class='bbc_emoticon' alt=':lol:' /> /laugh.gif' class='bbc_emoticon' alt=':lol:' /> /laugh.gif' class='bbc_emoticon' alt=':lol:' />

I keeep seeming to meet poeple with this trouble & sometimes they really struggle with the principles, so could you let me have some of your reinforced attachments so I can just hand them out & not bother with the explenations?

PS are they guaranteed, or might they discharge over time leading to new fall off? /wink.gif' class='bbc_emoticon' alt=';)' />
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#38   germ

germ
  • Members
  • 13,921 posts

Posted 03 April 2009 - 20:14

OK Sam, I've sent you all I had.

The last time I struggled with a Principle was in High School and I got expelled, but that's a whole other story...
/blush.gif' class='bbc_emoticon' alt=':blush:' />

Before I sent them I added a couple of metal straps to each one. One going from top to bottom, left to right, and front to back. That way if they ever start to discharge they'll just recharge themselves so I think I got the discharge problem taken care of.
/blink.gif' class='bbc_emoticon' alt=':blink:' />

I sent them via FED-UP (that's half-way by FED-EX, and the other half by UPS) and they assured me that they'd arrive by the second Tuesday of next week.
*COUGH* *COUGH*
/wink.gif' class='bbc_emoticon' alt=';)' />

If you need anything else, just holler.

(If you can't have a little fun once in a while here on the forum, what's the point? /laugh.gif' class='bbc_emoticon' alt=':lol:' /> )
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."
- Me -

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#39   spooks

spooks
  • Members
  • 7,017 posts

Posted 03 April 2009 - 20:39

OK Sam, I've sent you all I had.

The last time I struggled with a Principle was in High School and I got expelled, but that's a whole other story...
/blush.gif' class='bbc_emoticon' alt=':blush:' />

Before I sent them I added a couple of metal straps to each one. One going from top to bottom, left to right, and front to back. That way if they ever start to discharge they'll just recharge themselves so I think I got the discharge problem taken care of.
/blink.gif' class='bbc_emoticon' alt=':blink:' />

I sent them via FED-UP (that's half-way by FED-EX, and the other half by UPS) and they assured me that they'd arrive by the second Tuesday of next week.
*COUGH* *COUGH*
/wink.gif' class='bbc_emoticon' alt=';)' />

If you need anything else, just holler.

(If you can't have a little fun once in a while here on the forum, what's the point? /laugh.gif' class='bbc_emoticon' alt=':lol:' /> )


OK great thanks /cool.gif' class='bbc_emoticon' alt='B)' /> , I hope FED-UP have them properly contained & sealed in a hydroscopic vacuume chamber so they cant drop out, since as u said any spillage would have the cyberpolice jumping all over them (and your principle)!

I'll weight in all day, second teusday in antithipation. /blink.gif' class='bbc_emoticon' alt=':blink:' />
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#40   amirage

amirage
  • Members
  • 56 posts

Posted 07 April 2009 - 11:30

Contributions that may help if you have issues:

SID Killer http://addons.oscommerce.com/info/952
Duplicate Content Manager http://addons.oscommerce.com/info/6214


For further reading see: http://www.oscommerc...plementations/4

and http://www.oscommerce.info/kb/168

I hope that makes things clearer. /wink.gif' class='bbc_emoticon' alt=';)' />



Don't know if anyone else had probs with the contrib above SID KILLER..but in steps 5 and 6 of CHANGING THE BUTTONS the lines of code that needed replacing were not actually there:

ie:Step 5
========
File: /catalog/products_new.php
Find the code:

<td align="right" valign="middle" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new['products_id']) . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'; ?></td>

and replace it with:
(relevant new code)

and...
Step 6 (hey last step!)
========
File: /catalog/product_reviews.php
=========================================================
The reason for this change is that when there is NO review existent for a product,
the users get product_reviews.php, not product_reviews_info.php /wink.gif' class='bbc_emoticon' alt=';)' />. So we gotta mod a lil'


Find: ( Somewhere around line 189)

echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>';

Replace WITH


Anyone else have this prob?
All other suggested codes were found and replaced apart from these two.