Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi..

 

I have had my development OSC installed on my XP for a year or so and my production one on a *nix server and I could do most testing ok.

 

However, my XP machine has fallen in a heap and so I now have a Win 7 x64 box that I have been setting up. I found that I had to install different versions of PHP (5.3) and MySQL to work with the Win7 IIS. I also had to re-create my database from an export from my production site.

 

I have Ultimate SEO URLs 2.1 installed and as I know they don't work under Windows I turned them off in Admin. However, although the site works in production, my new beaut development site won't work and comes up with the following error Class 'SEO_URL' not found in C:\inetpub\wwwroot\includes\functions\html_output.php on line 23

 

I definitely have seo.class.php in my /includes directory and I also have SEO URLs turned off in the database. This worked on my XP machine with PHP 5.2 so is there an incompatibility here?

 

Is there a tweak I should make elsewhere?

 

Should I take the plunge and install Apache?

 

Should I install something else?

 

I really want my development and production sites to match and for both to work.

 

I would also like to minimise the time devoted to maintaining the site so that I can actually get on and create more products with which to populate them?

 

Any advice anyone?

 

Tks - all help appreciated

 

kdb

Posted

Hi..

 

I have had my development OSC installed on my XP for a year or so and my production one on a *nix server and I could do most testing ok.

 

However, my XP machine has fallen in a heap and so I now have a Win 7 x64 box that I have been setting up. I found that I had to install different versions of PHP (5.3) and MySQL to work with the Win7 IIS. I also had to re-create my database from an export from my production site.

 

I have Ultimate SEO URLs 2.1 installed and as I know they don't work under Windows I turned them off in Admin. However, although the site works in production, my new beaut development site won't work and comes up with the following error Class 'SEO_URL' not found in C:\inetpub\wwwroot\includes\functions\html_output.php on line 23

 

I definitely have seo.class.php in my /includes directory and I also have SEO URLs turned off in the database. This worked on my XP machine with PHP 5.2 so is there an incompatibility here?

 

Is there a tweak I should make elsewhere?

 

Should I take the plunge and install Apache?

 

Should I install something else?

 

I really want my development and production sites to match and for both to work.

 

I would also like to minimise the time devoted to maintaining the site so that I can actually get on and create more products with which to populate them?

 

Any advice anyone?

 

Tks - all help appreciated

 

kdb

 

Run apache rather than IIS

 

In the short term Chemos Seo Urls version 2 changes includes/functions/html_output.php function tep_href_link()

 

Replace what you have in there now with the standard osCommerce code as posted below: -

 

////
// The HTML href link wrapper function
function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $request_type, $session_started, $SID;

$page = tep_output_string($page);

if (!tep_not_null($page)) {
	die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

if ($connection == 'NONSSL') {
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} elseif ($connection == 'SSL') {
	if (ENABLE_SSL == true) {
	$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
	} else {
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
	}
} else {
	die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
}

if (tep_not_null($parameters)) {
	$link .= $page . '?' . tep_output_string($parameters);
	$separator = '&';
} else {
	$link .= $page;
	$separator = '?';
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
	if (tep_not_null($SID)) {
	$_sid = $SID;
	} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
	if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
	$_sid = tep_session_name() . '=' . tep_session_id();
	}
	}
}

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
	while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

	$link = str_replace('?', '/', $link);
	$link = str_replace('&', '/', $link);
	$link = str_replace('=', '/', $link);

	$separator = '?';
}

if (isset($_sid)) {
	$link .= $separator . tep_output_string($_sid);
}

return $link;
}

 

Obviously you'll need the seo url code back once you sort all this out.

Posted

Thanks for the prompt response - I'll try this out when I have finished something else that someone else has decided that I should do first

 

kdb

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...