Ok, Gary, I understand. But shared hosting settings cannot be changed. And for a user it doesn't seem to be like a hosting error, but an application. Because all the other CMS are working there.
My opinion is that it's not good idea to force a user to change his hosting where he can run another CMS, store data, etc. An accessibility is good for user. What is good for one user is good for the community. So, let's improve it. Agree?
BTW there are over 100.000 shared hostings with the same settings where I'm testing CE Phoenix. The provider offer pre-installed systems like WordPress, Joomla, etc. There is only one pre-installed e-commerce system, PrestaShop. I think there might be Phoenix too. But the first condition is a compatibility with hosting(s).
Solution suggestion
There should be new const INSTALLED_TO_SUBFOLDER = (true|false)
in admin/includes/configure.php
- There can be opt-in checkbox INSTALLED_IN_SUBFOLDER in the installation, e.g. "Installation to subdirectory - if you install application to other subdirectory then root www/, e.g. www/mysubdirectory/".
- Or it might be automatically detected from const DIR_FS_CATALOG.
In my case DIR_FS_CATALOG = '/data/web/virtuals/USER-ID/virtual/www/subdom/eshop/'
The following code was NOT TESTED, it's just a concept.
admin/includes/configure.php (line 15)
Code: Select all
DIR_FS_CATALOG = '/data/web/virtuals/USER-ID/virtual/www/subdom/eshop/'
if(stristr(DIR_FS_CATALOG, '/www/') {
$subdir_path = explode(DIR_FS_CATALOG, , '/www/');
$subdir_path = $subdir_path[1];
if(subdir_path !=="") {
const INSTALLED_TO_SUBFOLDER = true;
} else {
const INSTALLED_TO_SUBFOLDER = false;
}
}
admin/includes/application_top.php (line 42)
Code: Select all
// set php_self in the local scope
if(INSTALLED_TO_SUBFOLDER == true;) {
$PHP_SELF = basename($_SERVER['SCRIPT_NAME']);
} else {
$req = parse_url($_SERVER['SCRIPT_NAME']);
$PHP_SELF = substr($req['path'], strlen(DIR_WS_ADMIN));
}