'm getting the message below in Watchdog and really can't find any reason for it (PHP novice):

Type: warning
Date: Sunday, December 01, 2002 - 03:19
User: [Admin User]
Location: /drop/admin.php?mod=watchdog
Message: No valid themes enabled.
Hostname: n/a

I'm using Apache2, mod_php4, on FreeBSD 4.7-Stable
Drupal 4 in it's own Directory httpd.conf directive
Straight tar -xvzf of Drupal tarball
MySQL running on a different machine
conf.php changed to reflect MySQL location

Also, the themes show up in the site themes configuration menu/module and can be toggled on/off. The changes are reflected in the DB. However, themes do not show up in the Main Site config module menu nor do they show up in the User's menu.

Here's the tree:

$ pwd
/[somewebrootpath]/drupal
$ ls -l
total 88
-rw-r--r-- 1 root wheel 9200 Jun 15 11:49 CHANGELOG
-rw-r--r-- 1 root wheel 205 Oct 23 2001 INSTALL
-rw-r--r-- 1 root wheel 14940 Feb 4 2001 LICENSE
-rw-r--r-- 1 root wheel 1420 Apr 19 2002 MAINTAINERS
-rw-r--r-- 1 root wheel 1681 May 2 2002 admin.php
-rw-r--r-- 1 root wheel 381 Nov 1 2001 cron.php
drwxr-xr-x 2 root wheel 512 Nov 25 00:09 database
-rw-r--r-- 1 root wheel 495 Nov 1 2001 error.php
-rw-r--r-- 1 root wheel 4710 Jan 4 2001 favicon.ico
drwxr-xr-x 2 root wheel 512 Jun 15 10:50 includes
-rw-r--r-- 1 root wheel 377 Apr 14 2002 index.php
drwxr-xr-x 2 root wheel 512 Jun 1 2002 misc
-rw-r--r-- 1 root wheel 250 Mar 5 2002 module.php
drwxr-xr-x 2 root wheel 1024 Jun 15 10:50 modules
-rw-r--r-- 1 root wheel 1862 Jun 9 03:43 node.php
drwxr-xr-x 2 root wheel 512 Jun 1 2002 scripts
drwxr-xr-x 6 root wheel 512 Jun 15 11:49 themes
-rw-r--r-- 1 root wheel 26109 Jun 15 10:50 update.php
-rw-r--r-- 1 root wheel 361 Oct 20 2001 xmlrpc.php
$ ls -l themes
total 8
drwxr-xr-x 2 root wheel 512 Jun 1 2002 example
drwxr-xr-x 3 root wheel 512 Jun 1 2002 goofy
drwxr-xr-x 3 root wheel 512 Jun 1 2002 marvin
drwxr-xr-x 3 root wheel 512 Jun 1 2002 unconed

Any ideas?

Thanks a bunch

-t-

Comments

Travis’s picture

Here's the httpd.conf lines for it:

Alias /drop "/usr/local/www/drop"

        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all

Thanks,

-t- Only local images are allowed.

ax’s picture

"AllowOverride None" means that the .htaccess in "/usr/local/www/drop" won't be read, doesn't it? this may be the problem. try to change that so it will be read (ie. "AllowOverride All"). drupal depends on some of the settings their (php_value register_globals 1, php_value magic_quotes_gpc 0, ...).

Travis’s picture

Ax, what you're saying makes total sense, and I can't believe I overlooked it I've set http.conf AllowOverride directive for the drupal directory from 'None' to 'All' and restarted apache, but still the problem persists. I've also installed the latest cvs snapshot tarball.

I've also gone digging around a bit in the sources, but there's quite a bit of code in there I really can't make heads or tails of (yet Only local images are allowed. ).

Thanks for the help,

-t-

ax’s picture

if you upgrade from 4.0 to cvs, you need to run it. alternatively, you may try to get a cvs drupal database by throwing away your db and importing the cvs database.mysql. it changed quite a lot from the 4.0 database.mysql.

no more ideas really. could you try to put a phpinfo.php containing <?php phpinfo(); ?> into your drupal dir and check if the .htaccess settings (php_value register_globals 1, php_value magic_quotes_gpc 0, ...) are getting honored?

i don't think it's related to Apache2, because i got it running once.

Travis’s picture

I installed the CVS DB. No change. I created a simple php file which execs the php_info() function and noticed that the [IfModule mod_php4.c] line wasn't being matched in the .htaccess during Drupal's execution because the magic_quotes_gpc line read 1 in local. I couldn't find any matching module to replace mod_php4.c right away, so for testing purposes I just removed the [IfModule] tags and let the php values be set for every page view. I ran the php file with php_info() in it and the magic_quotes_gpc line read 0. So then I went and tried the themes again. Nope, still not working. LOL Any more ideas?

Thanks,

-t-

darren-1’s picture

I have the same issue, also running apache2 but this time on linux.
Same symptoms, can't select a theme other than default even though alternate themes are enabled.I also cannot add any content filters, and if I try to view any modules, I just get taken back to the index.php page...

If I turn on query log for viewing a module, here's what I get.

H E L P

Array
(
[0] => SELECT u.*, r.name AS role FROM users u LEFT JOIN role r ON u.rid = r.rid WHERE u.sid = 'b01614d490e21077f2956bbd614d0f57' AND u.status = '1' AND u.status SELECT name, filename FROM system WHERE type = 'module' AND status = '1' ORDER BY name
[2] => SELECT * FROM system where type = 'theme' AND status = '1' ORDER BY name
[3] => INSERT INTO watchdog (uid, type, message, location, hostname, timestamp) VALUES ('1', 'warning', 'No valid themes enabled.', '/index.php', '', '1039709238')
[4] => SELECT * FROM blocks WHERE (status = '1' OR custom = '1') ORDER BY weight, name
[5] => SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = ''
[6] => SELECT uid, name FROM users WHERE timestamp > unix_timestamp() - 3600 ORDER BY timestamp DESC LIMIT 5
[7] => SELECT uid, name FROM users WHERE status = '0' ORDER BY uid DESC LIMIT 5
[8] => SELECT p.perm FROM role r, permission p WHERE r.rid = p.rid AND name = ''
[9] => SELECT uid, name FROM users WHERE timestamp > unix_timestamp() - 3600 ORDER BY timestamp DESC LIMIT 5
[10] => SELECT uid, name FROM users WHERE status = '0' ORDER BY uid DESC LIMIT 5
)

Travis’s picture

See Subj. Only local images are allowed.

adamshand’s picture

i had this problem as well when i was first playing with drupal and the only way i ever solved it was to purge the db and reload it. it only ever happened when i was logged in and my saved settings were pointing to a theme that was either no longer installed (removed from the file system) or not enabled (in site configuration).

if you don't have anything valuable in your db and want to get it working i'd just purge and reload the db.

if you want to track it down my guess is that in your db either your global or personal theme setting is bogus somehow.

* try using drupal with a different browser (to make sure you don't have any cookies which log you in) and see if it works.
* try poking around in the db directly and figure out what your global and user preferences for theme's are and make sure that it's installed correctly.

hope that helps.
adam.

Dries’s picture

Odd. Do you know whether the problem persists when using Drupal CVS? Mind to try? You can download a nightly snapshot from the downloads page.

It might be related to Apache 2; not sure how many people are running Drupal on Apache 2 ...

Travis’s picture

I've installed the latest (391156 Dec 2 23:19 drupal-cvs.tgz) snapshot and the "no themes" problem persists. I've also reconfigured the directory directives in httpd.conf from AllowOverrides='None' to 'All'.

Any more ideas?

Thanks

-t-

Travis’s picture

Since I didn't see any need to run the newer Apache 2.x, and since I had the option, I simply switched to Apache 1.3, recompiled mod_php4 for Apache 1.3, and reloaded Drupal CVS. Now it's all working great. I'd like to see a write-up on getting things working under Apache 2.x sometime in the future, but for now I'll focus on writing my RP game tracking module for Drupal 4. Woohoo.

bengan-1’s picture

I also have apache 2.0, FreeBSD 4.7 and PHP4.2.3 and do get the same problem. I have tried 4.0.0 and 4.1.0 but the same problem. I suspect it is a problem with the config for apache 2.0 on FreeBSD. The odd thing I can see is that other weblogs do work on my system but not drupal.