Jump to content

Upgrading php4 to php5 caused an issue, please help!


Static_Nexus

Recommended Posts

Hi everyone!

 

a few days ago one of my companies webhost's upgraded their servers from php4 to php5, this seems to have broken part of our site. unfortunately the guys who designed this old part of our site are long gone so we have no one to support it :(

 

here is the error users are getting:

 

Fatal error: Cannot re-assign $this in /home/voltnet/public_html/qdata/sq2-07.php on line 3906

 

this page is located here:

 

http://www.volteurope.net/qdata/sq2-07.php

 

I looked up line 3906 and found this:

 

$this = FALSE;

 

i have attached the whole php file, if any one could help it would be MASSIVELY appreciated.

 

ps. Our webhost is Clook

 

[attachment deleted by admin]

$this is a special variable. PHP 5 is totally include oop concept. So you should change the variable name $this.

 

forgive me i know next to nothing about php :(. what do you mean oop concept?

 

And are you saying i just need to change all instances of $this to another name?

if $this is used as a normal variable in your page...so that you should change $this variable to another name...OOP means Object Oriented Programming...PHP4 do not support full oop..but PHP5 now full OOP language...so that we can now handle big softwares..easily.

 

 

instead of using

 

$this = FALSE;

 

try using

 

unset($this);

 

not too sure it will work tho but logically speaking should give you the same result...

 

this fixed the error but i encountered other problems after that - not to worry though it has been resolved!

 

thanks very much for all your help! :D

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.