back to

CSS/Theme support broken after upgrade

I upgraded phplist from v3.2.5 to v3.3.1 and the theme is completely broken (no theme is used, not even the default).

If I inspect the links, it seems that the theme name is not being inserted into the URLs (e.g. “”)

I tried modifying config.php by adding “$ui = ‘dressprow’;” and even tried setting the theme via url “” and “” but nothing works.

It’s enough to restore the previous 3.2.5 directory (without restoring the database) to get the CSS/Theme to start displaying (I did it only as a quick test).

Any help would be appreciated.

@bLight Was there anything unusual about your upgrade process? Had you manually set the theme in your config file before the upgrade? Are the three theme directories inside your /public_html/lists//admin/ui/ folder as expected?

It may help us if you attach your current /public_html/lists/config/config.php file (without database access info).

@samtuke I tried several methods:

  1. Copy over the previous directory, overwriting everything except the config.php file.
  2. Copy to a fresh directory, copying over the config.php file.

But one thing I noticed was that even the upgrade prompt when entering the admin section after copying the new version already didn’t have the CSS/Theme in use.

If needed, I will zip the full folder 3.2.5 folder.

I attached the content of the config.php file below, replacing account info with “xxxxxxxx”.



* ==============================================================================================================
* The minimum requirements to get phpList working are in this file. 
* If you are interested in tweaking more options, check out the config_extended.php file
* or visit
* ** NOTE: To use options from config_extended.php, you need to copy them to this file **


# what is your Mysql database server hostname
$database_host = "localhost";

# what is the name of the database we are using
$database_name = "xxxxxxxxx";

# what user has access to this database
$database_user = "xxxx";

# and what is the password to login to control the database
$database_password = 'xxxxxxxxx';

# if you have an SMTP server, set it here. Otherwise it will use the normal php mail() function
## if your SMTP server is called "" you enter this below like this:
##     define("PHPMAILERHOST",'');


$phpmailer_smtpuser = 'xxxxxxxxxxx';
$phpmailer_smtppassword = 'xxxxxxxxxxxx';

# if test is true (not 0) it will not actually send ANY messages, but display what it would have sent
# this is here, to make sure you edited the config file and mails are not sent "accidentally"
# on unmanaged systems

define ("TEST",0);
define ("REGISTER",0);


* Settings for handling bounces
* This section is OPTIONAL, and not necessary to send out mailings, but it is highly recommended to correctly 
* set up bounce processing. Without processing of bounces your system will end up sending large amounts of
* unnecessary messages, which overloads your own server, the receiving servers and internet traffic as a whole


# Message envelope. 
# This is the address that most bounces will be delivered to
# Your should make this an address that no PERSON reads
# but a mailbox that phpList can empty every so often, to process the bounces

$message_envelope = '';

# Handling bounces. Check README.bounces for more info
# This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';

# set this to 0, if you set up a cron to download bounces regularly by using the
# commandline option. If this is 0, users cannot run the page from the web
# frontend. Read README.commandline to find out how to set it up on the
# commandline

# when the protocol is pop, specify these three
$bounce_mailbox_host = '';
$bounce_mailbox_user = 'xxxxxxxxxxx';
$bounce_mailbox_password = 'xxxxxxxxxxxx';

# the "port" is the remote port of the connection to retrieve the emails
# the default should be fine but if it doesn't work, you can try the second
# one. To do that, add a # before the first line and take off the one before the
# second line
$bounce_mailbox_port = "110/pop3/notls";
#$bounce_mailbox_port = "110/pop3";

# it's getting more common to have secure connections, in which case you probably want to use
#$bounce_mailbox_port = "995/pop3/ssl/novalidate-cert";

# when the protocol is mbox specify this one
# it needs to be a local file in mbox format, accessible to your webserver user
$bounce_mailbox = '/var/mail/listbounces';

# set this to 0 if you want to keep your messages in the mailbox. this is potentially
# a problem, because bounces will be counted multiple times, so only do this if you are
# testing things.
$bounce_mailbox_purge = 1;

# set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
# messages are messages that could not be matched with a user in the system
# messages are still downloaded into phpList, so it is safe to delete them from
# the mailbox and view them in phpList
$bounce_mailbox_purge_unprocessed = 1;

# how many bounces in a row need to have occurred for a user to be marked unconfirmed
$bounce_unsubscribe_threshold = 3;

# choose the encryption method for password
# check the extended config for more info
# in most cases, it is fine to leave this as it is

Same problem. no any theme after upgrade from v3.2.7 to v3.3.1

Just to confirm, this is exactly what I’m seeing (just in English)

@bLight Do you actually have any theme directories in the admin/ui directory? There should be three - default, dressprow and phplist-ui-bootlist.

Yes. All directories are present

@arubtsov Where did the files, not the directories, come from? Those are actually soft links.
You do not appear to have the 3.3.1 released version.

Try removing the three files. Or do a clean install of 3.3.1.

I did clean installation. DB version 3.2.7. Same result. Here admin/ui directory content. There are not links now.

@duncanc presumably because the symlinks preexisted they could still be being used instead of the real theme directories.

My system is a Windows IIS server, I remotely logged in and overwrote the old files.

@duncanc All folders exist, I double checked. I read your posts regarding other upgrade issues and applied those suggestions but nothing so far worked.

As a fix attempt I also tried doing a clean install, only copying over the configuration file from the previous install, without success.

I also verified the windows user security for the phplist folder and the values were correct.

Do you mean that with a clean install the themes still don’t load? That’s strange.

@samtuke Yes, even on a fresh copy from the zip file, it will not show the themes.

And it’s enough for me to copy over the previous v3.2.5 folder I backed up for themes to return.

@bLight Can you try adding a statement in file admin/index.php

line 117 is

if (isset($_REQUEST['settheme']) && !empty($_REQUEST['settheme']) && is_array($THEMES[$_REQUEST['settheme']])) {

add this just before


then see what is displayed when going to the home page.

After adding home page displayed

array(0) { }

@arubtsov So at that point phplist thinks that it does not have any themes available. Can you now add some lines to file connect.php
First try changing line 107 from

while ($th = readdir($d)) {


while (false !== ($th = readdir($d))) {

Then see if that has any effect.
If not then add these lines

line 106 is

$d = opendir($themedir);

Add this immediately before


Then line 108 is

if (!in_array($th,

add this line before line 108


string(70) “/var/www/ruby-project-com/data/www/” string(9) “dressprow” string(10) “.gitignore” string(2) “…” string(19) “phplist-ui-bootlist” string(1) “.” string(7) “default” array(0) { }

array(0) {} comes from index.php i think

@arubtsov Can you try changing line 104 from

$themedir = dirname(__FILE__).'/ui/';


$themedir = dirname(__FILE__).'/ui';

i.e. just remove the trailing / character.

string(69) “/var/www/ruby-project-com/data/www/” string(9) “dressprow” string(10) “.gitignore” string(2) “…” string(19) “phplist-ui-bootlist” string(1) “.” string(7) “default” array(0) { }

Same result exept first var is 69 chars

@arubtsov Ok. Can you replace the whole while loop by this, to save you adding individual lines

while ($th = readdir($d)) {
    if (!in_array($th,
            array_keys($THEMES)) && is_dir($themedir.'/'.$th) && is_file($themedir.'/'.$th.'/theme_info')
    ) {
        $themeData = parse_ini_file($themedir.'/'.$th.'/theme_info');
        if (!empty($themeData['name']) && !empty($themeData['dir']) && !isset($themeNames[$themeData['name']])) {
            $THEMES[$th] = $themeData;
            $themeNames[$themeData['name']] = $th;