back to phpList.org

[SOLVED] Pageroot problem after upgrading to 3.3.7


#1

after upgrading to v3.3.7 i receive a “The pageroot in your config does not match the current location” warning in every admin page.
Everything seems to work as usual.
$pageroot is defined as “/” as it was before (and it should be correct).
Is there any way to fix this issue?


#2

If phplist is installed in the web root directory then $pageroot should be simply an empty string, not ‘/’. When phplist constructs URLs there will probably be double ‘/’ characters.


#3

now is $pageroot ="" and the warning disappeared.
It worked as “/” for several years so I was quite confident it was correct :wink:


#4

@utz.paolo When phplist creates links for click tracking

    $clicktrack_root = sprintf('%s://%s/lt.php', $GLOBALS['public_scheme'], $website.$GLOBALS['pageroot']);

if $pageroot has your original value then that URL will have an extra ‘/’ before ‘lt.php’, something like

https://mysite.com//lt.php


#5

ok, thanks a lot. I’m not using click tracking so I guess that’s why I never noticed the error.


#6

I ran into this same problem when upgrading from 3.3.1 to 3.3.7. That’s fine that a change was made in the code, but mention should be made in the upgrade documentation that the behavior has changed and that anyone who had “/” as their pageroot will need to remove the slash due to the coding change. Like the OP, my pageroot has been “/” for years, so yes, this is a behavior change.


#7

@Suela Suela, please can you update the release information for 3.3.7 https://www.phplist.org/newslist/3-3-7-release-notes/ to include this change? Add this to the Fixes section:

Ensure that a warning is issued when the config $pageroot value does not match the actual URL. This includes when phpList is installed in the web root directory and $pageroot is set to '/'. In this case $pageroot should be set to an empty string, ''.


#8

Thanks for pointing it out @duncanc. Release notes are now updated.