11-10-2018, 10:59 AM
It's a contribution to others that struggle with using US when it is installed not in the root of your website.
Something goes wrong (error messages in init.php and loading helper.php) and my below solution, that works:
i downloaded the last version of US and place this in a sub-folder: /applic/
then starting the install instructions and after that cleanup the install directory.
When using US you got error messages with the helper and init files.
The easiest way to solve this was defining my subfolder hardcoded in the init.php file like below:
$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';
then you can remove the lines above because it doesn't work very well and give waist compute time.
what i discover was that the variable $us_url_root first was /applic/ and later was gone and still /
so my init.php file looks like below:
<?php
require_once 'classes/class.autoloader.php';
session_start();
$abs_us_root=$_SERVER['DOCUMENT_ROOT'];
/*
$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;
for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";
if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}
*/
$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';
Something goes wrong (error messages in init.php and loading helper.php) and my below solution, that works:
i downloaded the last version of US and place this in a sub-folder: /applic/
then starting the install instructions and after that cleanup the install directory.
When using US you got error messages with the helper and init files.
The easiest way to solve this was defining my subfolder hardcoded in the init.php file like below:
$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';
then you can remove the lines above because it doesn't work very well and give waist compute time.
what i discover was that the variable $us_url_root first was /applic/ and later was gone and still /
so my init.php file looks like below:
<?php
require_once 'classes/class.autoloader.php';
session_start();
$abs_us_root=$_SERVER['DOCUMENT_ROOT'];
/*
$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;
for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";
if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}
*/
$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';