pageroot path causes errors if empty or not

Questions & Problems about Installing or Upgrading Version 2 phpList
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

pageroot path causes errors if empty or not

Postby celiac101 » 10:52pm, Tue 09 Sep, 2014

I am not sure if you are aware of this issue, but all statistics are broken unless I leave this empty in my config file:
$pageroot = '';

However, if I do that many admin functions are broken, including the "Create New Campaign" button. The workaround for me is to add my application's path to config when working in admin, and then remove it during the send...not good.
$pageroot = '/path/to/myapp';
No, the path to mine is not standard (and it shouldn't have to be either).

Is there a known fix for this issue?
celiac101
PL Nut
 
Posts: 29
Joined: 10:47pm, Sat 28 Dec, 2013

Re: pageroot path causes errors if empty or not

Postby duncanc » 10:40am, Wed 10 Sep, 2014

What is the value for "Website address (without http://)" on the Settings page?

$pageroot is the web path, not the file system path, to the phplist directory. So by default it is '/lists' but there should not be a problem with a multi-level path.

phplist uses both of these values when constructing links, such as for click tracking, and also for some admin pages when it redirects to itself. If you correct these values after sending out a campaign, then the link clicks in those campaigns already sent are not going to work.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: pageroot path causes errors if empty or not

Postby celiac101 » 10:22pm, Wed 10 Sep, 2014

I use /pm/public_html/lists
I substituted "pm" for lists. But yes, this causes big issues as described, so you are incorrect about using any path not causing issues. The absolute path to the application, which I do not use is:
/home/mysitename/public_html/pm/public_html/lists

So shall we consider this a bug report?
celiac101
PL Nut
 
Posts: 29
Joined: 10:47pm, Sat 28 Dec, 2013

Re: pageroot path causes errors if empty or not

Postby duncanc » 5:35am, Thu 11 Sep, 2014

Not sure that I understand your reply. The "website address" should be something like "www.mysite.com" but you seem to have a file system path.

Also, your file system path of "/home/mysitename/public_html/pm/public_html/lists" is a bit odd. Why have you installed phplist in that directory with a further level of public_html? It looks like you have copied the wrong directory from the phplist installation zip file.

You might not understand the terminology. The web root directory is "/home/mysitename/public_html" and by default phplist is installed in a "lists" subdirectory of that, "home/mysitename/public_html/lists", so that the url to access phplist admin pages is http://www.mysite.com/lists/admin.

You can change "lists" to something else,maybe that is what you intended by "pm" but then need to change the $pageroot variable in config.php from "/lists" to "/pm";.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: pageroot path causes errors if empty or not

Postby celiac101 » 9:56pm, Mon 15 Sep, 2014

I think you've answered my question...yes, my path does contain public_html twice, because that is the way that you pack it...you include public_html in the path, and you should not if it breaks things to include it. I simply wget your file, unpack it as is to use it--I am sure many do this as well, as it is a pain to do otherwise.

What is a bit odd, in my opinion, is that this would work beautifully for over 10 years, then suddenly break on the 3.x version--why? According to your statement I should be able to make my path:
public_html/public_html/public_html
and it should work fine...right?
celiac101
PL Nut
 
Posts: 29
Joined: 10:47pm, Sat 28 Dec, 2013

Re: pageroot path causes errors if empty or not

Postby duncanc » 5:30pm, Tue 16 Sep, 2014

So long as you set $pageroot to the correct value, which seems to be '/pm/public_html/lists', then phplist should work properly. But you didn't say what value you have for "website address" on the Settings page.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: pageroot path causes errors if empty or not

Postby celiac101 » 9:03pm, Tue 16 Sep, 2014

For the Website address value in settings I have:
www.mydomain.com/pm/public_html/lists/
and changing this to just www.mydomain.com causes the site to completely break...no links work.
celiac101
PL Nut
 
Posts: 29
Joined: 10:47pm, Sat 28 Dec, 2013

Re: pageroot path causes errors if empty or not

Postby duncanc » 12:56pm, Wed 17 Sep, 2014

You have set both "website address" ("www.mydomain.com/pm/public_html/lists/") and $pageroot (an empty string) incorrectly, but the mistakes seem to cancel out for link clicks. But for some phplist pages, they do cause a problem.

I suggest installing phplist in the "right" place and correcting the settings. I recognise that is going to give you a problem with existing link clicks, but will mean that things work correctly in the future.

If you are familiar with the Apache web server configuration then there might be a way to use rewrite rules to catch the link click requests and redirect them to the correct url.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: pageroot path causes errors if empty or not

Postby celiac101 » 4:59pm, Wed 17 Sep, 2014

I found a configuration that does work, and want to share it for anyone else who had this happen after upgrading to 3.x.

I think I had a cookie issue when I changed this before, but basically after changing to the settings below and clearing my cookies all seems to work ok:
$pageroot = '/pm/public_html/lists';
For the Website address value in settings I have:
www.mydomain.com

Also, is it ok to chmod 444 the config file for higher security?
celiac101
PL Nut
 
Posts: 29
Joined: 10:47pm, Sat 28 Dec, 2013


Return to Installing & Upgrading

Who is online

Users browsing this forum: No registered users and 1 guest