Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26680

INI Cache files are generated with wrong filepaths

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 5.1, 5.2, 2014.11, dev-master, 5.3.7, 5.3.8, 5.3.10
    • Fix Version/s: None
    • Component/s: Legacy bridge, Legacy stack
    • Labels:

      Description

      Using the legacy system via legacy bridge.
      When publicAPI calls are executed via Symfony controller and for example a user is created via UserService, this Signal is triggered into legacy System cache management.

      The eZINI::instance() is called inside user datatype which checks site.ini cache file. In the cache file are relative paths to override ini files which do not work because application is in Symfony context (and not cwd in legacy).

      The override file is not found via file_exists() and the new generated cachefile is w/o override files cached, which "destroys" legacy application.

      Cache file generated inside legacy context (backend request):

      <?php
      // This is a auto generated ini cache file, time created:Fri, 25 Nov 16 12:23:32 +0100
      $data = array(
      'rev' => 2,
      'created' => '2016-11-25T12:23:32+01:00',
      'charset' => "utf-8",
      'files' => array (0 => '/www/coach.whatscoach/git/WhatsCoach/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',1 => 'settings/override/site.ini.append.php',
      ),
      'file' => '/www/coach.whatscoach/git/WhatsCoach/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
      'val' => array ('Cache' => array........

      Example of corrupt cache file:

      <?php
      // This is a auto generated ini cache file, time created:Fri, 25 Nov 16 12:21:21 +0100
      $data = array(
      'rev' => 2,
      'created' => '2016-11-25T12:21:21+01:00',
      'charset' => "utf-8",
      'files' => array (0 => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
      ),
      'file' => '/www/exampleh/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
      'val' => array ('Cache' => array........

      Cache file after applied patch:

      <?php
      // This is a auto generated ini cache file, time created:Thu, 24 Nov 16 21:46:25 +0100
      $data = array(
      'rev' => 2,
      'created' => '2016-11-24T21:46:25+01:00',
      'charset' => "utf-8",
      'files' => array (0 => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',1 => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/override/site.ini.append.php',
      ),
      'file' => '/www/example/ezpublish_legacy/lib/ezutils/classes/../../../settings/site.ini',
      'val' => array ('Cache' => array........

      1. ini-cache.patch
        2 kB
        Artur Wawrzynkiewicz

        Activity

        Show
        Artur Wawrzynkiewicz added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1269

          People

          • Assignee:
            Unassigned
            Reporter:
            Artur Wawrzynkiewicz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: