Jump to content

juan_ariza131

Members
  • Posts

    2
  • Joined

  • Last visited

About juan_ariza131

  • Birthday 03/29/1993

Profile Information

  • Location
    Spain
  • First Name
    Juan
  • Last Name
    Ariza Toledano

juan_ariza131's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Knownband Plugins the issue I'm reporting here is not related with the installation of Prestashop. It's related with "persistence on containers". I am able to install PrestaShop but then I want to be able to persist some data on a volume attached to the container. The changes I detailed before describe the process I followed. As I mentioned before the new version's approach to create the paths inside PrestaShop has changed and it's less tolerant to changes in the directory structure. I'm having issues because of incompatibilities on a symlink environment. Could someone try to reproduce the scenario I am describing and suggest a workaround? Thanks in advance.
  2. In the new releases of the versions 1.7.x.x. I found an issue related with the use of __DIR__ and __FILE__ constants to build paths and persistence environments. I will try to describe the situation: Prestashop Installation Directory: /home/user/prestashop/ Persistence Directory: /persitance/prestashop/ Directories to Persist: /home/user/prestashop/modules, /home/user/prestashop/config, /home/user/prestashop/uploads, /home/user/prestashop/downloads, /home/user/prestashop/themes, /home/user/prestashop/img, /home/user/prestashop/app/config and /home/user/prestashop/app/logs. I created symlinks from /home/user/prestashop/DIRECTORY to /persitance/prestashop/DIRECTORY for every directory I wanted to persist. The purpose of this is being able to persist the DATA of PrestaShop on a Volume with benefits on containers environments. Problem: On previous versions (1.6.x.x) I just needed to edit the file `config/defines.inc.php`: /* Directories */ if (!defined('_PS_ROOT_DIR_')) { define('_PS_ROOT_DIR_', realpath($currentDir.'/..')); } with: /* Directories */ if (!defined('_PS_ROOT_DIR_')) { define('_PS_ROOT_DIR_', '/home/user/prestashop'); } All the paths were built using that constant and everything worked fine.So... What's the problem now? There are dozens of php files under some of the persisted directories that use __DIR__ and __FILE__ php constants to build relative paths. When using those constants (e.g. file: modules/welcome/welcome-api.php line 27): require_once(__DIR__.'/../../init.php'); The path is resolved to /persisted/prestashop/init.php since __DIR__ is resolved using the path to the persisted directory. However, the file referenced is NOT persisted and it's actually is at /home/user/prestashop/init.php. The situation described before creates dozens of Server Internal Errors. Is there anyway to configure the PrestaShop 1.7.x.x to indicate to ALL the files to build the paths using '_PS_ROOT_DIR_' as we could did it before?
×
×
  • Create New...