Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Install Question STS


Guest

Recommended Posts

I think I botched the install. From my os admin page I click on modules, STS is listed to the left. I click on it. The +install button is to the right, I click on it and nothing happens.

 

Ideas?

Link to comment
Share on other sites

It might be the location I copy and pasted it.

 

oscommerce/catalog

 

to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates...

 

Should I have pasted it right into oscommerce as to overwrite the catalog file?

 

Any help troubleshooting would be appreciated.

 

-Dano

Link to comment
Share on other sites

It might be the location I copy and pasted it.

 

oscommerce/catalog

 

to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates...

 

Should I have pasted it right into oscommerce as to overwrite the catalog file?

 

Any help troubleshooting would be appreciated.

 

-Dano

Dan,

If this is a new installation of osC 060817, then you are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc.

There is a simple fix:

 

 

1. Open the catalog/admin/includes/functions/compatibility.php.

2. At the end of the “do_magic_quotes_gpc” routine, add the following code

 

reset($ar);

 

It will end up looking like this:

 

function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

 

3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Thanks Bill,

 

Still no dice. I am new to both PHP and oscommerce. Attached are some screen shots of how the path is set up and where I inserted the code into the php.

 

Error in oscom consol

 

The paths on the server...

 

Example of where I instered code in PHP...

 

Another dreamweaver screen of paths/code

 

I successfully installed "easy populate" last night, could that be the problem?

 

Thanks in advance,

Dano

Link to comment
Share on other sites

It might be the location I copy and pasted it.

 

oscommerce/catalog

 

to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates...

 

Should I have pasted it right into oscommerce as to overwrite the catalog file?

 

Any help troubleshooting would be appreciated.

 

-Dano

Dan,

Not sure if the above was a typo but you should not have the two "catalog" folders. If your store had a actual "catalog" folder where all the osCommerce files were located, then that would have been the location where the STS contribution "modified_files/catalog" and "new_files/catalog" would have needed to be uploaded to.

 

NOTE: The term "catalog" is used throughout all osCommerce contributions as the name of the folder where your store catalog files are located (all of your osCommerce files).

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Anyone have any idea how I might resolve this error...?

 

Fatal error: Cannot redeclare get_javascript() (previously declared in

/home/pro-scre/public_html/includes/functions/sts.php:91) in

/home/pro-scre/public_html/includes/sts_display_output.php on line 419

 

Thanks,

 

Mike

Link to comment
Share on other sites

Anyone have any idea how I might resolve this error...?

 

Fatal error: Cannot redeclare get_javascript() (previously declared in

/home/pro-scre/public_html/includes/functions/sts.php:91) in

/home/pro-scre/public_html/includes/sts_display_output.php on line 419

 

Thanks,

 

Mike

Mike, it appears you may have an older version of STS installed. You will need to remove the older version before installing STSv4.x.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

  • 8 months later...

I have a weird problem. 5 minutes ago login.php worked perfect, now I changed an image name and can't fix it.

 

I replaced tep_image_button('button_continue.gif', for button_register.gif in login.php. After that this start happening:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29

 

And this is the code:

 

line 19: function do_magic_quotes_gpc(&$ar) {

if (!is_array($ar)) return false;

while (list($key, $value) = each($ar)) {

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

} else {

$ar[$key] = addslashes($value);

}

}

reset($ar);

line 29: }

 

I uploaded a previuos version of login.php just in case I modified something else by accident but this keeps happening. I have STS 4.5.3. Could that be it?? 6 minutes ago was working, what could have happened :S ?

Link to comment
Share on other sites

I have a weird problem. 5 minutes ago login.php worked perfect, now I changed an image name and can't fix it.

 

I replaced tep_image_button('button_continue.gif', for button_register.gif in login.php. After that this start happening:

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29

 

And this is the code:

 

line 19: function do_magic_quotes_gpc(&$ar) {

if (!is_array($ar)) return false;

while (list($key, $value) = each($ar)) {

if (is_array($ar[$key])) {

do_magic_quotes_gpc($ar[$key]);

} else {

$ar[$key] = addslashes($value);

}

}

reset($ar);

line 29: }

 

I uploaded a previuos version of login.php just in case I modified something else by accident but this keeps happening. I have STS 4.5.3. Could that be it?? 6 minutes ago was working, what could have happened :S ?

This may be from a cache problem. Try viewing your site from a different computer.

Also, STSv4.5.8 has a lot of bug fixes from the version you are currently using.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

This may be from a cache problem. Try viewing your site from a different computer.

Also, STSv4.5.8 has a lot of bug fixes from the version you are currently using.

 

I updated to sts 4.5.8 and tried from other pcs and the issue is still there.

 

The thing is that the line that is supposed to have an error, its just a }.

A "}" does not declare a function so It cant cause a redeclare function error.

 

WTF is going on?

 

Is is safe to delete the whole function from compability.php? I need this issue gone ASAP

 

Just had an idea: is there a function to detect if a function has been created or not? So i can add this to fix the issue:

 

if (do_magic_quotes_gpc is not declared) {

do_magic_quotes_gpc() {.....}

}

Edited by JuanIgnacio
Link to comment
Share on other sites

  • 2 months later...
I updated to sts 4.5.8 and tried from other pcs and the issue is still there.

 

The thing is that the line that is supposed to have an error, its just a }.

A "}" does not declare a function so It cant cause a redeclare function error.

 

WTF is going on?

 

Is is safe to delete the whole function from compability.php? I need this issue gone ASAP

 

Just had an idea: is there a function to detect if a function has been created or not? So i can add this to fix the issue:

 

if (do_magic_quotes_gpc is not declared) {

do_magic_quotes_gpc() {.....}

}

 

 

 

I got the same problem. Same code Same thing. I got it on line 30:

////
// Recursively handle magic_quotes_gpc turned off.
// This is due to the possibility of have an array in
// $HTTP_xxx_VARS
// Ie, products attributes
 function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;

reset($ar);
while (list($key, $value) = each($ar)) {
  if (is_array($ar[$key])) {
	do_magic_quotes_gpc($ar[$key]);
  } else {
	$ar[$key] = addslashes($value);
  }
}
reset($ar);
 }

Link to comment
Share on other sites

  • 1 year later...
  • 10 months later...
  • 2 months later...

Same problem here.

 

In this case in Order Editof contribution, after clicking "Send order confirmation email".

 

Anyone solved this before??

 

 

I'm having the same issue - after an order goes all the way through and I hit the last step <confirm order> and press that I get this error..

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/empirest/public_html/includes/functions/compatibility.php:18) in /home/empirest/public_html/includes/functions/compatibility.php on line 30

 

any idea's on what to look for and change.

Link to comment
Share on other sites

Hello, I have a little doubt.

 

I am modifying files to install the sts, particularly now the admin / includes / boxes / modules.php

 

according to the manual I have to look:

 

.'' BOX_MODULES_PAYMENT. ''

 

and then write:

 

/ / START STS 4.1

.'' BOX_MODULES_STS. .''

/ / END STS 4.1

 

Part of code is this:

 

if ($ selected_box == 'modules') (

$ Contents [] = array ('text' => '<a href="'. Tep_href_link(FILENAME_MODULES,'set=payment','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_PAYMENT. '</ a> <br> '.

'<a Href="'. Tep_href_link(FILENAME_MODULES,'set=shipping','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_SHIPPING. '</ A> <br>'.

'<a Href="'. Tep_href_link(FILENAME_MODULES,'set=ordertotal','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_ORDER_TOTAL. '</ A>');

)

and my question is .... :) Where is next? ... I guess it will be a triviality, but better to ask. I hope you can lend a hand. thanks

Link to comment
Share on other sites

Hello, I have a little doubt.

 

I am modifying files to install the sts, particularly now the admin / includes / boxes / modules.php

 

according to the manual I have to look:

 

.'' BOX_MODULES_PAYMENT. ''

 

and then write:

 

/ / START STS 4.1

.'' BOX_MODULES_STS. .''

/ / END STS 4.1

 

Part of code is this:

 

if ($ selected_box == 'modules') (

$ Contents [] = array ('text' => '<a href="'. Tep_href_link(FILENAME_MODULES,'set=payment','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_PAYMENT. '</ a> <br> '.

'<a Href="'. Tep_href_link(FILENAME_MODULES,'set=shipping','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_SHIPPING. '</ A> <br>'.

'<a Href="'. Tep_href_link(FILENAME_MODULES,'set=ordertotal','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_ORDER_TOTAL. '</ A>');

)

and my question is .... smile.gif Where is next? ... I guess it will be a triviality, but better to ask. I hope you can lend a hand. thanks

 

Why even ask?? The contribution comes with the file in question so all you have to do is a file comparison to see where the code should go. wink.gif

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

  • 5 weeks later...

hi i have read the forums, tried several things, uploaded new files to change but nothing, i still get the following error in admin "PAYMENT MODULES"

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/includes/functions/compatibility.php on line 30

 

SHIPPING MODULES

 

Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php on line 30

 

CAN SOMEONE PLEASE HELP....

 

Kind regards

Dawn

Link to comment
Share on other sites

hi i have read the forums, tried several things, uploaded new files to change but nothing, i still get the following error in admin "PAYMENT MODULES"

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/includes/functions/compatibility.php on line 30

 

SHIPPING MODULES

 

Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php on line 30

 

CAN SOMEONE PLEASE HELP....

 

Kind regards

Dawn

 

So, if you get the Fatal error: Cannot redeclare do_magic_quotes.gpc() [...] then note which php file you called when you got the error, and make sure you haven't mistakenly copied the same file to the languages folder.

 

These errors usually mean you copied a file to the wrong folder and in the process may have inadvertantly copied over a necessary file of the same name (but in a different folder).

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

  • 2 months later...

I had the same problem and found that i had uploaded a file to the wrong directory. (The file had the same name.) I discovered this by looking at the size of the file. The file size was very different than the one in the original installation package.

 

to correct it i uploaded the original file over top of the file i accidentally uploaded.

 

Good luck.

 

Mike

Mike VanBibber

Email me

Link to comment
Share on other sites

I had the same problem and found that i had uploaded a file to the wrong directory. (The file had the same name.) I discovered this by looking at the size of the file. The file size was very different than the one in the original installation package.

 

to correct it i uploaded the original file over top of the file i accidentally uploaded.

 

Good luck.

 

Mike

 

 

Yes, osCommerce has a lot of files with the same name, but the key is that they are located in specific folders.

 

For example, files that osCommerce would "include" in a page would be found in the "includes" folder. Well, since there is a frontend catalog (includes) and a backend admin(admin/includes) that would use file includes, they both have an "includes" folder.

 

In either the admin or the catalog (frontend), both may have a modules section for example and the same name issues would be found there as well.

 

Before installing ANY add-on to osCommerce, it is a good idea to get familiar with the folder structure and the overall flow of the program first. It will make installing contributions (add-ons) a lot easier to understand.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...