ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Difficulties after moving to different provider -- PHP4 to PHP5 -- solution found

October 26, 2009 12:28pm

Subscribe [4]
  • #1 / Oct 26, 2009 12:28pm

    tomtomtom

    46 posts

    Dear EE experts,

    I’m facing some difficulties after my ExpressionEngine installation was moved to another provider / webhoster.

    When looking at the index-page I receive this error

    Fatal error: Cannot re-assign $this in /client_003/x_system/modules/weblog/mod.weblog.php on line 3163

    Solution found—> For everyone who is getting this error:

    It is caused by a modification of the file mod.weblog.php. You have modified the file at some point to make the multi relationship extension work under PHP4. Now that you have switched to PHP5 the modification is obsolete and causes the error above.

    Also if you change your hoster, make sure PHP options like magic quotes etc. are enabled because otherwise this might cause additional errors. And check your charsets.

    Thanks for everyone’s support.

    Cheers Tom

  • #2 / Oct 26, 2009 5:19pm

    Ingmar

    29245 posts

    What version and build of EE are you on? Do you’ve got a link to the site in question?

  • #3 / Oct 26, 2009 5:27pm

    tomtomtom

    46 posts

    Right, sorry, forgot to post the version. It’s 1.6.4.

    Unfortunately the site is only available through Intranet at the moment…

  • #4 / Oct 26, 2009 5:57pm

    Ingmar

    29245 posts

    That version is almost 18 months old. Any chance you could upgrade to a more recent build? What help us to rule out file corruption issues as well.

  • #5 / Oct 26, 2009 6:10pm

    tomtomtom

    46 posts

    Hi Ingmar.

    I could do that, but usually I prefer not to touch a running system. I might run into other problems then, e.g. I’m using quite a few 3rd party plugins.

    Mmmh, corrupted files.. can that be caused by just a simple relocation?

  • #6 / Oct 26, 2009 7:14pm

    Adam Dorsey

    1439 posts

    tomtomtom-

    Upgrading to a new version of EE rarely messes up any of your third-party add-ons, and it is always a good idea to keep them up-to-date as well. Not to say its “impossible” just very rare.

    If in transferring the site, you may have timed-out on a particular file, or something may have corrupted a file in the transfer process.

    At any rate, I would still recommend updating to the latest EE version. Detailed instructions can be found here:
    http://expressionengine.com/docs/installation/update.html

  • #7 / Nov 02, 2009 8:43am

    tomtomtom

    46 posts

    Hi. Thanks again for your replies. I have reuploaded the files to make sure they are not corrupted. Unfortunately it didn’t help.

    The new server runs on PHP5, the old on PHP4. I think that the problems are likely caused by that as nothing else has changed. Same files, same database. Would you agree?

  • #8 / Nov 02, 2009 11:30am

    Sue Crocker

    26054 posts

    What is the goal behind the PHP code? Are you using some sort of a form previously?

  • #9 / Nov 02, 2009 11:52am

    tomtomtom

    46 posts

    The site’s using short links such as example.com/?c=4, so the URL is where it gets the category from.

    But other errors occur from different code, when I remove this line, which is why I assumed that it might be a general problem with the PHP syntax used throughout the site, which might not be interpreted correctly by the different PHP version

    Though it appears that the fatal error I mentioned in my initial post is caused by something other than syntax.

  • #10 / Nov 02, 2009 12:14pm

    Sue Crocker

    26054 posts

    In EE, we usually use URL segments to pass values. Is there a reason you aren’t using that sort of syntax?

  • #11 / Nov 02, 2009 12:48pm

    tomtomtom

    46 posts

    I would usually use segments. Yes, for this site the custom system was easier because the site’s menu would require switching between EE and PHP code a few times which is a problem parse-wise. But I digress.

  • #12 / Nov 02, 2009 3:01pm

    tomtomtom

    46 posts

    I solved the “fatal error”. It was indeed caused by the PHP4 to PHP5 switch. But it was not an internal EE problem, it was a modification necessary for the multi relationship extension to run under PHP4. Once I replaced the modified file, the fatal error disappeared.

    Unfortunately I still get the other parse error. It might have something to do with the use of quotation marks. Has anyone made experiences with quotation marks being interpreted differently in PHP5?

  • #13 / Nov 02, 2009 5:43pm

    Ingmar

    29245 posts

    I solved the “fatal error”. It was indeed caused by the PHP4 to PHP5 switch. But it was not an internal EE problem, it was a modification necessary for the multi relationship extension to run under PHP4.

    It’s probably not a good idea to apply three year old hacks to a current version of EE. which reminds me:

    I have reuploaded the files to make sure they are not corrupted.

    Does that mean you have upgraded to a more recent build, or are you still running 1.6.4?

    Unfortunately I still get the other parse error. It might have something to do with the use of quotation marks. Has anyone made experiences with quotation marks being interpreted differently in PHP5?

    When you go to Admin > Utilities > SQL Manager > System Variables
    Can you tell us what value the variable sql_mode has?

  • #14 / Nov 02, 2009 6:56pm

    tomtomtom

    46 posts

    Hi Ingmar,

    SQL mode is empty, so I guess it’s not strict.

    It’s probably not a good idea to apply three year old hacks

    I haven’t applied it. I’ve removed it. It was necessary for PHP4 but now caused the fatal error with PHP5. So you’re right, it wouldn’t be a good idea.

    I still get a couple more errors but I suppose they are all not caused by EE’s internal code.

    Thanks for the support. Tom

  • #15 / Nov 02, 2009 7:49pm

    Adam Dorsey

    1439 posts

    Hi tomtomtom-

    Let us know if you need further assistance, or if you have figured out what is happening.

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases