Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Register Globals Support


Guest

Recommended Posts

Hey all I just installed the patch and when I try to access my admin section i get teh following error.

 

Fatal error: Cannot re-assign $this in D:\Clients\11204\seantaylor36.com\seantaylor36.com\catalog\admin\includes\classes\upload.php on line 31

This problem has been brought up on the forums many times - I suggest you search for it.

 

It has nothing to do with this contribution

 

Rich.

Link to comment
Share on other sites

  • Replies 280
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

 

First off I know this has been asked before, but I can't find an answer, so here goes :

 

I have my site running with register_globals contrib and use EasyPopulate as the main method to upload my stock. However since register_globals has been switched off, the EP Upload function does not work. Does not display any error messages just seems to go away and do nothing (it does not even copy the file to the temp directory)

Now I can download OK and my temp dir permissions are set OK. Also my path to the temp dir seems ok (box standard catalog/temp)

 

So, has anyone solved this.

 

Apologies if this is posted in the wrong topic, but wasn't sure whether to start a new thread, post here, or post in an existing EasyPoualte contrib.

 

Thanks in advance

 

Paul

Link to comment
Share on other sites

Hi,

 

First off I know this has been asked before, but I can't find an answer, so here goes :

 

I have my site running with register_globals contrib and use EasyPopulate as the main method to upload my stock....

I never use the upload feature of EP (I don't like the idea of my web server uploading files). I oopy the files manually via ssh and then tell EP to pick up the files from where I have uploaded them to. This works fine.

 

So, no, sorry - I don't know what the answer is and I'm not able to test this. Anyone else out there know ?

 

Rich.

Link to comment
Share on other sites

Well, I'm off. I will no longer visit/monitor this forum. if you have problems then you can PM me or email me and I might get back to you. No promises though.

 

I will keep my PM / email address open but I don't know how long the forum will maintain my login (and hence my email address link) once it stops being used, so if you are reading this some time from now and find that my details have been erased then at least you know why.

 

bye.

 

Rich.

Link to comment
Share on other sites

No, the free version of winzip should be fine - if you just open the tar.gz file with winzip it should open it with no problems. Can't understand why people have a problem with this - odd. Maybe you are just trying to click on the file and expect it to open winzip, but it isn't ? If you are then try opening the file manually from winzip instead.

 

Unless you can switch register globals off (you may be able to using a .htaccess file - see the apache ( www.apache.org ) and php ( www.php.net ) web sites for more details), then I would not install this contribution. Installing this and leaving register globals enabled will probably cause problems with the session handling. Besides, there is no point at all in installing this if you are not going to switch register globals off.

 

Rich.

 

Richard,

 

Winzip will on at least some occaisions mangle tar.gz files. If you recall my mangled posting of your Easypopulate Data File Tools , that was a result of a Winzip mangling. Not a consistent problem, but definitely there.

 

David

Link to comment
Share on other sites

Hi,

 

First off I know this has been asked before, but I can't find an answer, so here goes :

 

I have my site running with register_globals contrib and use EasyPopulate as the main method to upload my stock. However since register_globals has been switched off, the EP Upload function does not work. Does not display any error messages just seems to go away and do nothing (it does not even copy the file to the temp directory)

Now I can download OK and my temp dir permissions are set OK. Also my path to the temp dir seems ok (box standard catalog/temp)

 

So, has anyone solved this.

 

Apologies if this is posted in the wrong topic, but wasn't sure whether to start a new thread, post here, or post in an existing EasyPoualte contrib.

 

Thanks in advance

 

Paul

Well, as a general clue, I often see such behavior in an EP install when the temp directory is not writable. This would make me suspect that it is a sessions related problem. IE - the EP code may think it is a session user who does not have permission to write to the temp directory. Or, the permissions on that directory may have been changed, or the EP file itself may not be owned by the webserver....

(figured you'd probably looked at the last two items but, you never know..)

 

David

Link to comment
Share on other sites

Firstly, thanks Richard for the register_globals contribution :) You're great!

 

Anyway, I also had the same logout session_unregister problem for the catalog.. Not sure if I'm doing the right thing, but I followed your instructions and suggestions and got mine working finally.

 

In the logout.php file, I added this:

tep_session_destroy();

 

on the line just above:

require(DIR_WS_INCLUDES . 'application_bottom.php');

 

It worked but as I'm a php newbie, so please correct me if I'm wrong.

 

Thanks again :)

 

 

I tried this, it works, but in my logoff, I had to add php tags like this:

<?php tep_session_destroy(); >?

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

I have recently installed register_globals patch on my site. whenever someone goes to checkout process, use the credit cars module and click confirm order, he is being returned to the login section.

 

When I try to set my internet explorer setting options to the lowest level of security, which means accept all cookies, it works fine.

 

since most of the user use the medium type of settings in their internet explorer it doesn't work for them.

 

Does anybody has any idea what went wrong?

THanks,

Link to comment
Share on other sites

Hello there...

 

Ive installed a couple of OsC Ms2.2 shops and the all work :D

 

But now ive installed a new shop for a friends sake and i don?t know what the problem is...

 

 

Ive been asked to avoid to switch on Register_Globals and hence ive installed the Contrib: Register_Globals:Off thingie.. :)

 

Register_Global Patch - LINK TO THE CONTRIB *Press here to open*

 

The shop is set up on a Webhotel that runs on tight security and ive looked in the forums for problems regarding the register global patch and ive found that a few people have problem running OsC 2.2 on PHP5

So maby that?s it ??

 

Ive mailed my admins on the hotel and asked them if they use PHP5 on the server ive got my account on :blush:

 

Hopefully we can all sort this mess out :thumbsup:

Cheers and keep up the good work.

Link to comment
Share on other sites

Here's how you can check the server settings yourself:

 

Use notepad (or other text editor) create an ASCII text file with this line:

 

<?php phpinfo() ?>

 

Save that file as test.php

Must be a text file with .php extension - NOT test.php.txt

 

>Upload test.php (as ASCII file) - to the server

 

Run test.php from the browser

e.g. www.domain.com/test.php

 

This will display all the php settings.

Link to comment
Share on other sites

Here's how you can check the server settings yourself:

 

Use notepad (or other text editor) create an ASCII text file with this line:

 

<?php phpinfo() ?>

 

Save that file as test.php

Must be a text file with .php extension - NOT test.php.txt

 

>Upload test.php (as ASCII file) - to the server

 

Run test.php from the browser

e.g. www.domain.com/test.php

 

This will display all the php settings.

 

 

Oooh sorry i didn?t say i knew that :blush: im just a bit frontseeing and while i wrote to the support i also asked if they could put the account on a server not running php5 :D

Link to comment
Share on other sites

Oooh sorry i didn?t say i knew that  :blush:  im just a bit frontseeing and while i wrote to the support i also asked if they could put the account on a server not running php5  :D

 

 

Theyre running PHP Version 5.0.2 on that server ive got the account on but i have set up OsC 22 on anoter of their servers so i might get it moved to a lower phpsystem :thumbsup:

 

but im still intrested of getting it to work on php5 :D

Link to comment
Share on other sites

Guys,

I have a really anoying problem that I can't solve for almost a week... I just don't know what to do...

Every time that a client use the credit card module and click confirm order, the user is sent to the credit card gateway and in case his credit card is not valid, he should return to the checkout_payment.php page with an error message and to checkout_success.php if the credit card is valid.

it all worked fine until I installed register_globals patch. now, everytime a client confirm his order, he return to the login.php instead of returning to the checkout_payment.php or checkout_success.php.

 

Probably the session end after he return from the credit cards gateway, but I just can not understanf why?!

 

The problem started right after installing the register_globals patch.

 

help...

Link to comment
Share on other sites

  • 4 weeks later...
What I did to workaround the patch+register_globals=on possible problems is put every part of the patch in if(ini_get('register_globals') == '1') { original_code } else { patch } blocks.

Hi Fred, I'm interested in this too, mainly for testing purposes. Would it be possible to mail me your files (or some of the files), it would save me some time :) Edited by PandA.nl
Link to comment
Share on other sites

Hi all, slowly getting everything working here as I go through this heavily moded store.

 

What I am stumpped on and wonder if anyone has any suggestions, I am not able to upload images in admin after I have installed the contribution.

 

Anyone have this problem or can point me where to start looking in my code for missing vars?

 

Thanks.

Link to comment
Share on other sites

Hi all, slowly getting everything working here as I go through this heavily moded store.

 

What I am stumpped on and wonder if anyone has any suggestions, I am not able to upload images in admin after I have installed the contribution.

 

Anyone have this problem or can point  me where to start looking in my code for missing vars?

 

Thanks.

 

I am getting the same issue. I am running the debuggin in application_top that the contributions suggests for the contribution and getting this answer:

 

----------

GET

goto -> '/home/mysite/public_html/catalog//images'

 

But because I havent fixed any of my contributions I am not quite confident in adjusting the GET variables on the page??? Anyones help would be appreciated.

Cath

Link to comment
Share on other sites

Theyre running PHP Version 5.0.2 on that server ive got the account on but i have set up OsC 22 on anoter of their servers so i might get it moved to a lower phpsystem  :thumbsup:

 

but im still intrested of getting it to work on php5  :D

 

 

Anyone got Osc 2.2 working with PHP 5

This should be a HOT TOPIC by now......

Link to comment
Share on other sites

Hi

 

I am having difficulties in receiving a variable back from another server back to mine. I have done a small little test script to see if the problem is register_globals contribution.

 

I can get the small file to work on another server with register_globals = on, but can't get it to work on the server where they are set to off.

 

The basic programs are below.

 

Any feedback as to how to get the variable would be gratefully recieved.

 

Question.htm

<html>
<head></head>
<body>
<form method="POST" action="answer.php">
What is the Netbanx Ref?
<input name="netbanx_reference" type="text">
<br><br>
<input type=submit>
</form>
</body>
<html>

 

Answer.php

<html>
<head></head>
<body>
<?php $_POST['netbanx_reference']; ?>     
<p>
The Netbanx Reference is <?php echo $netbanx_reference; ?><br>
</p>
</body>
<html>

 

All I get back on the screen is :-

 

"The Netbanx Reference is"

 

Please let me know if I am doing this correctly.

 

Thanks

Alex

Link to comment
Share on other sites

I've got some trouble i.c.w. the "official PayPal IPN module"and this register_globals patch

 

Often (but not allways? a testorder I did seemed to have no problem) PayPal orders don't get an order number. There is no error message and customers may complete the whole PayPal payment proccess and we do get the order e-mail.

 

But no PayPal orders appears in the database!

 

I did some testing and it appears that when it goes wrong the $_POST['invoice'] value is empty at checkout, and the $cart_PayPal_IPN_ID var in the paypal_ipn.php module too. Can't figure out yet why it happens though :(

 

Any ideas?

 

Does anyone have these two (PayPal IPN and the register_globals patch) working together?

 

thanks

Link to comment
Share on other sites

Panda,

 

I also had an issue when i turned register globals off with the wishlist contrib where no product id was being passed to the db. Have you tried the "HANDY HINT FOR FINDING REGISTER GLOBALS PROBLEMS AND SOME BUG-HUNTING TIPS" on page 4 this might be a good place to start.

Link to comment
Share on other sites

Have you tried the "HANDY HINT FOR FINDING REGISTER GLOBALS PROBLEMS AND SOME BUG-HUNTING TIPS" on page 4 this might be a good place to start.

Now that you mention it, I've seen it, but didn't think about it anymore :rolleyes: It's quite difficult error seeking though, because it's not so easy to force the error and such.

 

Thanks for the tip anyway Mike, I will certainly take a closer look at it!

Link to comment
Share on other sites

I've got some trouble i.c.w. the "official PayPal IPN module"and this register_globals patch

 

Often (but not allways? a testorder I did seemed to have no problem) PayPal orders don't get an order number. There is no error message and customers may complete the whole PayPal payment proccess and we do get the order e-mail.

 

But no PayPal orders appears in the database!

 

I did some testing and it appears that when it goes wrong the $_POST['invoice'] value is empty at checkout, and the $cart_PayPal_IPN_ID var in the paypal_ipn.php module too.

Ok, thanks to the "HANDY HINT FOR FINDING REGISTER GLOBALS PROBLEMS AND SOME BUG-HUNTING TIPS" (and Mike), I think I've almost found the solution.

 

The $cart_PayPal_IPN_ID var appears to be empty because $insert_id isn't set, and the $insert_id isen't set because no order is saved into the databse. The orders is not saved into the database because because at the top of the "if (tep_session_is_registered('cartID'))" appears to be false.

 

The strange part is that $_SESSION cartID = '' , both if the globals patch is enabled or not. But without the globals patch the empty cartID session value ($_SESSION cartID=>'') returns true and with the patch the same empty cartID session value returns false!! :blink:

 

On my test system I changed (in modules/payment/paypal_ipn.php)

    function confirmation() {
     global $cartID, $cart_PayPal_IPN_ID, $customer_id, $languages_id, $order, $order_total_modules;

     if (tep_session_is_registered('cartID')) {

to:

    function confirmation() {
     global $cartID, $cart_PayPal_IPN_ID, $customer_id, $languages_id, $order, $order_total_modules;

     if (tep_session_is_registered('payment')) {

And that seems to work for now.

 

Does anyone happen to know why $_SESSION cartID = '' returns true w.o. patch and false with the patch? And if if cartID really should be '' (registered but empty) at that time?, it seems not a very logical value for a cart id :huh:

Link to comment
Share on other sites

Hi Paul,

 

there is an already patched version available for download as a separate contribution. If you search the contribs for "globals" you must be able to find it.

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