Changing the default install location

Hello, i have some php experience and i wanted to change the default install location from /lists to another name. Primarily because web sniffers look for default install folder names for open source projects and so i would like to change the folder name.

I did change the pageroot variable in the config extended file but i was still getting this

The pageroot in your config does not match the current locationCheck your config file

I found the code in the admin/index.php file where you check for location REQUEST_URI on line 714 so i ran some tests like so at the top of the admin/php file

$pageroot = "/mycustomename";

echo "stringpos- ".strpos(getenv('REQUEST_URI'), $pageroot.'/admin');
echo "<br>";
echo "pagerootadmin- ".$pageroot.'/admin'; 
echo "<br>";
echo "server request uri- ".$_SERVER['REQUEST_URI'];
echo "<br>";
echo "get env uri- ".getenv('REQUEST_URI');

which returns the following

stringpos- 0
pagerootadmin- /mycustomname/admin
server request uri- /mycustomname/admin/
get env uri- /mycustomname/admin/

so according to this it should work. So it must be another file that is triggering this error.

I also found the code in the init.php file on line 661 where you check to see if $pageroot is empty (meaning we installed phplist in our public_html (which i have and its public_html/mycustomname)

It seems i am in between a rock and a hard place here. It looks like (from the code) that if we install this script in our public_html then we have no choice but to name the folder lists. I dont see a way that i can meet both sets of code expectations, have it in the public_html and call it something else.

If i leave the $pageroot blank for public_html install then the script will set the value to lists, however if i set the value of $pageroot to my custom name, it wont find it.

Also i noticed that there are some hard coded images and other items in the files that must use “lists” as the directory.

So does all this mean that it is pretty much impossible to use a custom folder name at this point with the phpList script and have it work effectively?

Afterthought here…

if (WARN_ABOUT_PHP_SETTINGS && !$GLOBALS['commandline']) {

i guess i could set “WARN_ABOUT_PHP_SETTINGS” to false right?

Even if i change it to

$pageroot = ‘/customname/lists’;

it still flags it…

Thanks for your time…

Dave :slight_smile:

You need to make changes to config.php not config_extended.php. That is explained at the start of config.php.

1 Like

Thank you duncanc, i cant believe i overlooked this note you spoke of

** NOTE: To use options from config_extended.php, you need to copy them to this file **

Thats got it… thank you again…

Well i was going to post a great tutorial on another subject, but since i have reached my limit on posts set by this forum and its not possible, i guess ill wait till tomorrow. Silly rule by the way… :slight_smile: How do you expect people to contribute when you limit them during the time they are most excited by the software.