phplist3 icon indicating copy to clipboard operation
phplist3 copied to clipboard

Community news - cache directory not writable on installation

Open phpitech opened this issue 7 years ago • 3 comments

When installing phplist, receive the following:

[Note: have added a debug_print_backtrace() call to see the stack trace before the error

image

As an observation, and happy to add pull requests for some of these:

a) a simple call is used to grab the URL that may not work behind a corporate firewall e.g. if authentication is required. There are library e.g. guzzle php that could be used to enhance this

b) the rss parser looked to be abandoned code (when doing a quick google search) - i'm not sure if you would consider a PR that added a maintained parser?

c) in this context, the error message did leak the PHP path; although arguably that is a web server configuration issue; although should the default setup be more robust?

d) A quick glance suggests the rss parser is responsible for setting the cache directory in this case - I'm not sure whether this path can be configured through the config_extended.php

phpitech avatar Aug 21 '18 19:08 phpitech

@phpitech Thanks for raising this. PRs for your points a) and b) -- yes please! Regarding c) and d), I'm not sure. @michield probably knows

samtuke avatar Aug 22 '18 18:08 samtuke

a) yes, true. But even with guzzle, you'd need to configure something for it to work ootb, presumably b) yes, absolutely. I recall there were some similar attempts in the past c) your php.ini settings should cover that. In general phpList is not very verbose at all and switches error reporting off (which some people don't like either) d) it uses the value set in config.php; https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/communityfeed.php#L72

which is mentioned in config_extended: https://github.com/phpList/phplist3/blob/master/public_html/lists/config/config_extended.php#L730

and defaults to /tmp

https://github.com/phpList/phplist3/blob/master/public_html/lists/admin/init.php#L677

michield avatar Aug 27 '18 12:08 michield

by the way, config_extended is only there for reference. To action the settings, you need to copy them to config.php

https://discuss.phplist.org/t/config-php-vs-config-extended-php-files/2034

michield avatar Aug 27 '18 12:08 michield