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.

php error in Extensions.php after moving site to a new server

December 19, 2012 12:56pm

Subscribe [2]
  • #1 / Dec 19, 2012 12:56pm

    Thomas Hartmann

    170 posts

    Hi there

    I have this error, after I moved my whole site to a new server. I changed paths and updated files like databse, config, admin, index, and so on.

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Parameter 1 to User_extension_base::sessions_end() expected to be a reference, value given
    
    Filename: libraries/Extensions.php
    
    Line Number: 241

    This error comes by Solspace User Modul, and the developpers say, you have to replace Extensions.php with its version from 2.5.2. I am on 2.5.3, how can I get this file or solve this issue?

    Thx in advance

  • #2 / Dec 19, 2012 1:22pm

    Gareth Davies

    491 posts

    You are in luck as this bug was fixed in yesterday’s release so just update to 2.5.4 and should be all good:

    https://support.ellislab.com/bugs/detail/18263

  • #3 / Dec 19, 2012 2:30pm

    Thomas Hartmann

    170 posts

    thx gareth

    I will try this!
    I am right now in a process of going live with a site and there are some problems.

    It seems that on my new virtuals server, php is not parsed at all, maybe because of the error on top in this post.
    On my live site, this error exists also, but by debug=0, the site runs perfect.

    To take look, you would have to extend your host.txt with my server.
    I would appreciate this really..

    Thx Thomas

  • #4 / Dec 19, 2012 2:42pm

    Thomas Hartmann

    170 posts

    my php code in the browser looks like this, even if I enabled PHP in this template…
    it says: he found some xml, which html cannot parse…

  • #5 / Dec 19, 2012 2:56pm

    Thomas Hartmann

    170 posts

    php code which is not parsed is in embeded templates…php on main site works…

  • #6 / Dec 19, 2012 3:15pm

    Gareth Davies

    491 posts

    First things first, I assume that PHP is turned on for the embedded template?

    It’s difficult to see all the code from your attachment as partially obfuscated by a tooltip but if it is the database query that is causing you issues you may be better off going with the native database class (you can set up a secondary connection if this isn’t querying the main EE database)

    http://ellislab.com/expressionengine/user-guide/development/usage/database.html

  • #7 / Dec 19, 2012 3:25pm

    Thomas Hartmann

    170 posts

    yes php is on.

    it’s not the database query, no php is parsed, even a echo is not parsed…and when i delete <?php and ?> the code is printed to the website

  • #8 / Dec 19, 2012 3:32pm

    Gareth Davies

    491 posts

    OK -  have you updated to 2.5.4 to remove that variable from debugging and are no longer seeing the warning?

  • #9 / Dec 19, 2012 3:41pm

    Thomas Hartmann

    170 posts

    no, i do not updated yet.
    but in index.php, debug is set to 0, and I see no warning…

    in my index file, php is executed
    but I have embeded templates in my sidebar, these templates allow php too, but php is not parsed.

    honestly, I think it’s something so close, that I dont get it…argh!!!

  • #10 / Dec 19, 2012 4:07pm

    Gareth Davies

    491 posts

    I would suggest that this issue is actually related so I would definitely upgrade before trying to debug further.

    The logic behind php not working in the embedded template is that an embedded template is processed very late by ExpressionEngine so if there is an issue maybe it’s happening after php on the main template has been output but before php is run on the embedded template.

    Either way upgrading is the best place to start…

  • #11 / Dec 19, 2012 4:51pm

    Thomas Hartmann

    170 posts

    hey gareth, I will give this a try…

    but it’s really weird, when I view a template direct from the CP it works, if I watch the template embeded in the website, content is wrong, alos expression engine tags are displaying wrong data…

  • #12 / Dec 20, 2012 12:21pm

    Thomas Hartmann

    170 posts

    I updated EE to 2.5.4 and I got now following error:

    Error Number: 1054
    
    Unknown column 'session_id' in 'field list'
    
    INSERT INTO `exp_security_hashes` (`date`, `hash`, `session_id`) VALUES (1356023643,'5cad35afe4609846dfb640d5200dd56ddde922f7','444ab37e5b143159d728e393de51ef33bd8405c6')
    
    Filename: core/EE_Security.php
    
    Line Number: 118

    thx guys!

  • #13 / Dec 20, 2012 12:31pm

    Gareth Davies

    491 posts

    This does relate to a change in EE2.5.4 as the ip_address column was altered in exp_security_hashes called session_id and ip_address column was removed. Seems like your database hasn’t been updated properly. I would suggest manually create a column session_id in exp_security_hashes (ironically if the update had worked correctly you would be getting a similar error related to a Solspace module that still references the ip_address column that no longer exists)

    ALTER TABLE exp_security_hashes
    ADD session_id varchar(40) default '0' NOT NULL

    This specifically is the update code (but as I said above as you are using a Solspace addon you’ll need to keep the ip_address column anyhoo so I’d just add a new column)

    $this->EE->dbforge->modify_column(
        'security_hashes',
        array(
         'ip_address' => array(
          'name'    => 'session_id',
          'type'    => 'varchar',
          'constraint'  => 40
         )
        )
       );

     

  • #14 / Dec 20, 2012 12:47pm

    Thomas Hartmann

    170 posts

    when I take look in my phpmyadmin, I see that column was updated to session_id, but there is no ip_adress anymore, so it look fine. But error says, that unknown column session_id…hmmm

    see attachement..thx

  • #15 / Dec 20, 2012 12:50pm

    Gareth Davies

    491 posts

    Strange indeed - try to empty it out as this is a known fix for a number of exp_security_hashes issues:

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

ExpressionEngine News!

#eecms, #events, #releases