Jump to content
Sign in to follow this  
dealindano

Install Question STS

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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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 ?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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);
 }

Share this post


Link to post
Share on other sites

Same problem here.

 

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

 

Anyone solved this before??

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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


Mike VanBibber

Email me

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×