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

INI Cache files are generated with wrong filepaths

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 5.0, 5.1, 5.2, 2014.11, dev-master, 5.3.7, 5.3.8, 5.3.10
    • Legacy bridge, Legacy stack

    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........

      Attachments

        Activity

          People

            Unassigned Unassigned
            ae86293c-2b95-4cf0-8e9e-5d57dd46c648@accounts.ibexa.co Artur Wawrzynkiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: