When linking (ln –s) DEV/d832std/core to DEV/common/drupal832/core (core -> ../common/drupal823/core/ ), the installation restart as the site has not been installed. The installation prcess is taking -> ../common/drupal823/core/sites as the installation directory and at the verification stage, it trows and error on the files directory and settings.php not being present (verified by creating the files directory in DEV/common/drupal832/core/default/files ).
This generate a PHP fatal error: PHP Fatal error: Cannot redeclare config_get_config_directory() (previously declared in /data/www/d8/DEV/d8std/core/includes/bootstrap.inc:147) in /data/www/d8/DEV/common/drupal823/core/includes/bootstrap.inc on line 147

I tried to symlink core sub-directory one by one.
- Linking core/assets works.
- Linking core/includes works.
- Linking core/lib lead to the PHP fatal error: Cannot redeclare config_get_config_directory()  this makes sense!

There are already some discussions concerning similar issues:
https://www.drupal.org/node/1008402 , https://www.drupal.org/node/1792310 , https://www.drupal.org/node/1672986 , https://www.drupal.org/node/2767907
From my reading, it seems to be related to the use of realpah/ dirname and __DIR__ in various places. I tried to replace them in install.php and bootstrap.php by $_SERVER['DOCUMENT_ROOT'] without any success. I endup with the same PHP error.

core/install.php modification only leads to the same PHP error
// Change the directory to the Drupal root.
//chdir('..');
// Store the Drupal root path.
//$root_path = realpath('');
$root_path = $_SERVER['DOCUMENT_ROOT'];
chdir($root_path);

core/includes/bootstrap.inc modification
//define('DRUPAL_ROOT', dirname(dirname(__DIR__)));
define('DRUPAL_ROOT', $_SERVER['DOCUMENT_ROOT']);

When both modification in install.php and bootstrap.inc are made, there is no PHP error anymore but I am taken back to the installation page. The Verify Requirments step works since $_SERVER['DOCUMENT_ROOT'] is pointing to DEV/d8std/sites/default/… . But I get a new PHP fatal error: PHP Fatal error: Cannot redeclare system_requirements() (previously declared in /data/www/d8/DEV/common/drupal823/core/modules/system/system.install:25) in /data/www/d8/DEV/d8std/core/modules/system/system.install on line 25, referer: http://d8std.opwebs.comdev/core/install.php?rewrite=ok&langcode=en&profi...

My setup is Unbuntu 14 LTS, Apache 2.4.7 with vhost, PHP 5.6. The installation is made by downloading the tar file.
The file structure is:
/data/www/d8/DEV/d8std (docroot in a vhost, with the original files)
/data/www/d8/DEV/common/drupal823 (the original drupal files to which I link to)

At some point I manage to start the DB installation step, but without getting the progress bar and only 21 tables got created. I don’t remember exactly what I had done to get that far, I think I have also modified something in bootEnvironment() with $_SERVER['DOCUMENT_ROOT'], but not sure.

This is how far I got and at this stage I am wondering if it is possible to symlink the core and vendor directory like it was in D7?
I am currently using multisite but I don’t like it and would highly prefer to symlink core and vendor at leads

Has anyone manage to make this work?

Comments

psiegel created an issue. See original summary.

cilefen’s picture

Of the related issues you mentioned, it seems this issue is a duplicate of #1792310: Wrong DRUPAL_ROOT with non-standard code structure

psiegel’s picture

Yes, I had seen this one as well, bu no solution yet.

I did continue trying a few things, no luck so far.

There is an additional issue, no sure if I should start a new issue, let me know and I will.

When trying to symlink the sites/default/files/js and sites/default/files/css directories I get a error: "File temporary://file4jPV1k could not be moved/copied because the destination directory public://js is not configured correctly."

The permissions are of course set, I even tried with chmod 777, just to make sure.

Linking sites/default/files/php is working.

I was also looking for a setting to tel drupal where thee directories are, like a $config in settings.php, any help is appreciated.

I suppose/ hope this is just a bug. I really would like to not have the cache in the files directory.

Best,
Pascal

cilefen’s picture

Status: Active » Closed (duplicate)