Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Accessing admin Problem


corum10

Recommended Posts

Installed osc ok and am right now looking at the pre configed page. I'm happy, but when i try to access admin i get this error message:

 

Fatal error: Cannot re-assign $this in /home/www/mydomain/catalog/admin/includes/classes/upload.php on line 31

 

Any ideas really appreciated as I'm at a loss.

Thanks in advance all.

Link to comment
Share on other sites

Installed osc ok and am right now looking at the pre configed page. I'm happy, but when i try to access admin i get this error message:

 

Fatal error: Cannot re-assign $this in /home/www/mydomain/catalog/admin/includes/classes/upload.php on line 31

 

Any ideas really appreciated as I'm at a loss.

Thanks in advance all.

 

 

I get the same exact error so your not alone in your suffering... :angry:

So this is two people with the same issue? Maybe more? Just for the people reading this and maybe helping I am running Windows 2000 Apache2 PHP5 MySQL 4.1.10 Thanks in advanced!

Link to comment
Share on other sites

Installed osc ok and am right now looking at the pre configed page. I'm happy, but when i try to access admin i get this error message:

 

Fatal error: Cannot re-assign $this in /home/www/mydomain/catalog/admin/includes/classes/upload.php on line 31

 

Any ideas really appreciated as I'm at a loss.

Thanks in advance all.

 

 

I was getting the same error after I installed and hit the site administrator button. I went and opened the upload.php file and took a look. This is a piece of the code; the

 

// self destruct

 

$this = null;

 

return false;

 

is where its pooping out. You know what I did - I commented out line 31 like this.

 

// $this=null;

 

with no obvious side affects. Site administrator started up. Sorry I can't give a better solution. I would like to know WTF too. But for now there you go.

Link to comment
Share on other sites

Thanks BlueFoot, lolol the kind of fixes I love. now will wait for my world to explode lolol Hey, if it works right.

Thanks again

 

 

You R welcome.

 

Hope to hear what the real problem was.

Link to comment
Share on other sites

I was getting the same error after I installed and hit the site administrator button. I went and opened the upload.php file and took a look. This is a piece of the code; the

 

// self destruct

 

      $this = null;

 

  return false;

 

is where its pooping out. You know what I did - I commented out line 31 like this.

 

// $this=null;

 

with no obvious side affects. Site administrator started up. Sorry I can't give a better solution. I would like to know WTF too. But for now there you go.

 

So why would there be a self destruct line of code? I know it was encourage us to A: really understand PHP, or B: Join the community? Well both ways worked for me. :D

Link to comment
Share on other sites

So why would there be a self destruct line of code? I know it was encourage us to A: really understand PHP, or B: Join the community? Well both ways worked for me.  :D

 

 

Did a forum search on "line 31".

 

Looks like if you running php 5 that you will get this error. Either "downgrade" to a version 4 compile or comment out the $this=null; line.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

I had a customers site that just suddenly starting getting this and found that their host was on php version 4.3.10

 

A quick search on google found this page :

 

creloaded.com forum

 

I tried the suggested fix for PHP5:

 

GO TO directory: admin/includes/classes/ and open upload.php , there is on line

// self destruct

$this = null;

 

THIS should be :

// self destruct

$this == null;

 

and now admin works correctly again!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...