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.

A few php errors possibly after upgrade from freelancer to commercial license.

March 13, 2011 5:14pm

Subscribe [2]
  • #1 / Mar 13, 2011 5:14pm

    IT Buff

    13 posts

    I have upgraded to the commercial license following the instructions and the change was on the same version.

    Everything appeared to work well I have all channels templates but I have a few php errors listed below.

    1) When trying to access the Pages module from the modules menu I receive the following error:

    Parse error: syntax error, unexpected T_VARIABLE in /home/system/expressionengine/modules/pages/mcp.pages.php on line 373

    note: I have installed the extension SafeCracker.

    2) When using the Simple Commerce module I go to create Item. Edit pops up and if I select a listed entry I receive the following error:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/themes/cp_themes/default/content/publish.php on line 263

    3) When in Blogger API Configurations, if I click on default I receive a long list of errors which I attached to this post.


    Apart from that everything else appears fine.

  • #2 / Mar 14, 2011 2:59am

    IT Buff

    13 posts

    OK I solved no 1) Pages Modules.

    It turns out that the following lines were inserted into the php file mcp.pages.php after line 373:

    /* Location: ./system/expressionengine/modules/pages/mcp.pages.php */eturn $this->index();
          }
          else
          {
    $message = ($delete_pages > 1) ?
    $this->EE->lang->line('pages_deleted') : $this->EE->lang->line('page_deleted');

    $this->EE->session->set_flashdata('message_success', $message);
    $this->EE->functions->redirect(BASE.AMP.'C=addons_modules'.AMP.'M=show_module_cp'.AMP.'module=pages');
    }
      }
    }

    It is a copy of lines 358 to 373 but the php command starts with eturn instead of return.

    I only have 2 modules installed the discussion forum and SiteCracker extension so I have no idea how to reproduce this bug.

    I wonder if anyone else has ever come across this behaviour ?

    So I deleted everything from the end of line 373 to end of file, saved the file and the Pages module is back to normal.

  • #3 / Mar 14, 2011 3:11am

    IT Buff

    13 posts

    Solved no 2 as well.

    Similar problem as number (1).

    File: /themes/cp_themes/corporate/content/publish.php
    Removed this from end of the line 263:

    ->session->userdata(‘group_id’) == 1):?>
          <div id=“new_tab_dialog” title=”<?=lang(‘add_tab’)?>” [removed]>
            <form action=”#”>
             
                  <label><?=lang(‘tab_name’)?></label>
                  <input id=“tab_name” type=“text” value=”” name=“tab_name”/>
             
            </form>
          </div>
      <?php endif;?>
    <!—/Modals—>


    <?php
    if ($EE_view_disable !== TRUE)
    {
    $this->load->view('_shared/accessories');
    $this->load->view('_shared/footer');
    }

    /* End of file publish.php */
    /* Location: ./themes/cp_themes/corporate/content/publish.php */

    So Simple Commerce is fine now.

  • #4 / Mar 14, 2011 2:37pm

    Sue Crocker

    26054 posts

    Hi, IT Buff.

    When you look with a text editor at the original files, do you see that added text? I looked at the /system/expressionengine/modules/pages/mcp.pages.php file in EE 2.1.3 and 2.1.4 Beta, and didn’t see any additional text.

    How did you do the upgrade? Did you rename the system folder and FTP up the newer files?

    In any case, glad things are working again…

  • #5 / Mar 14, 2011 4:22pm

    IT Buff

    13 posts

    Hi Sue,

    Yes to make it was easier I deleted the folders (system and themes) after backup and copied the new version. I don’t think the installation had anything to do with it though. then copied the 2 files config and database and reset permissions.

    Something modified the files but I’m not sure what as I can’t reproduce the error. After the update I also enabled several modules.

    The only other thing I can recall is I did a search and replace to modify a specific tag and variable name. But the search text was unique something like {embed: itbuff_header ...

    Number (3) is still a problem though.

  • #6 / Mar 14, 2011 5:22pm

    Sue Crocker

    26054 posts

    Number three you have in another thread, so let’s continue there.

    Might this be some sort of an attempted hack of your system? Here’s a boilerplate response we normally send out.

      Thanks for reporting this. We take security very seriously and will do our best to work with you on figuring out what’s going on. To that, we need some additional information from you…

      1. EE version and build (found at the bottom of your control panel)
      2. Other scripts on your account, whether in use or not (phpBB, etc…)*

      * If this is a shared hosting environment, the host can make a determination if the attack came through scripts on another account on the server, which is commonly the case with these types of hacks.

      While we work through this, please check through these files:

      * path.php (if using EE 1.x)
      * config.php
      * database.php (if using EE 2.x)
      * index.php

      to ensure that there is no unusual code such as iFrames or Javascript includes; if you do find that code, then please back-up the file and remove said code.  If you are unsure of what does or doesn’t belong in these files, do not hesitate to ask.

      You may also wish to refresh your files by following the build update instructions.

      Also please ensure that you report this to your host immediately as they can help identify where the attack originated from so that steps can be taken to prevent this in the future.

  • #7 / Mar 14, 2011 10:51pm

    IT Buff

    13 posts

    No it wasn’t a hack that is certain.

    The time frame in which the errors happened was during my module install.

    But I would like an answer to the other thread as I have seen this same error elsewhere where the answer was to clear the cache. However I followed the suggestion with no luck.

  • #8 / Mar 15, 2011 3:05pm

    Sue Crocker

    26054 posts

    Clearing the cache is something you do when weird things happen. Sometimes is fixes things, but often times it won’t make a difference. Answering the bloggerapi stuff in the other thread.

    Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases