I have been trying to get a fresh install of phplist to work. I have read the documentation and forum but nothing seems to work. I have edited the config.php and tried all combinations I can imagine to get it right but still i get this stupid error;
The pageroot in your config “NAN” does not match the current location “”. Check your config file.
At one point it said;
The pageroot in your config “” does not match the current location “”. Check your config file.
I am using the newest version of the software, is there any way to get this to work or does phplist simply not function correctly on some hosts? I have php version 7.3 i believe. The database and everything else seems to be working just fine.
@sortebill the explanation in config_extended should help you but you shouldn’t need to do anything if you have installed phplist in the default location which is ‘/lists’.
// if you change the path to the phpList system, make the change here as well
// path should be relative to the root directory of your webserver (document root)
// If you install phpList in the document root then the value should be an empty string, not '/'.
// Warning: Do not change this after installation. You can only change this before you
// install and initialise phpList.
$pageroot = '/lists';
I did that and the problem persists. As I explained initially, I have followed all advice and instructions I could find on the web. I have installed in default location and not changed the name of the folder.
@sortebill I didn’t understand your previous explanation. If you have installed phplist in the default location, i.e. accessed as mysite.com/lists then you don’t need to set $pageroot because the default value is correct.
If you have installed phplist in a different location then you do need to set $pageroot.
@duncanc even if it is installed in the correct directory the error persists, if I change the $pageroot to the correct directory I get the same error. I don’t really understand why this happens. To be honest I don’t really understand why this variable has to be set at all and I cannot seem to find any remedy for this problem. The error is the same if the pageroot variable is set or not.
@sortebill The variable is used by phplist to construct full URLs to phplist for use by user and click tracking, amongst others. Have you installed phplist on a subdomain, in which case $pageroot should be an empty string.
@duncanc I can’t seem to find any solution for this problem so I’ll just have to look at some other software. Phplist seemed promising but if such a trivial thing is going to make the entire thing not work then it’s probably best to spend time on something that will work on a basic shared host without problems. Thanks for your reply.
It just seems very archaic to not have a better installer for something like this, I mean, most users who get these kinds of errors probably just give up and move on, so it would be good for phplist devs to sort it out so that this silly error doesn’t happen.
@sortebill Thanks, given that URL then the value of “/lists” for $pageroot should work. If it doesn’t then there’s something odd happening. Maybe there is an apache rewrite rule being used, or a soft link, which is confusing things.
@sortebill If you have a few minutes to try to debug this problem. I am guessing that the method used by phplist to get the URL is not working on your server.
Can you add these lines to the end of config.php