Hi ....

I have just installed Drupal 5.0 on my site! Seems like a nice CMS :-)
For now I'm just playing around with Drupal in order to get familiar with Drupal

But I have a problem.
When I go to:
Administer \ Site building \ Themes \ "configure garland theme"

and try to change the color of the theme nothing and press "Save configuration" nothing happens except it tells me that "The configuration options have been saved."

The only thing that changes is the preview image

What am I doing wrong!

/Ulrik Lund

Comments

marcor’s picture

For me it works great! The newly generated graphics and the stylsheed are saved into files/color/garland-##md5hash##/

  • You need enough (more than 8MB) php-memory set in php.ini
  • You need a /files-directory
  • You need write access for your http-server-process (apache) in files and all subdirs
ubl’s picture

Thanks for the input!

In order to get Drupal to work with my host (www.one.com) I had to out comment these two lines in the ".htaccess" file.
----------- .htaccess---------------------------------
# Don't show directory listings for URLs which map to a directory.
#Options -Indexes (<-- # added by me)

# Follow symbolic links in this directory.
#Options +FollowSymLinks (<-- # added by me)
----------- .htaccess---------------------------------
Could this have anything to do with my problems?

After changing the colors this folder was made:
/files/color/garland-0b2b735f/

If I view the png files in the folder, the colors are just right (the color theme I chose)

As far as I can see I must have write access through the apache server.

About php.ini file where do I find this one?

marcor’s picture

yes, write access is ok. If all graphics are created well, even php memory is enough. You have to set it in php.ini, many help-pages here deal with that. You find your personal php.ini file in drupal 5 by looking at http://yourdrupalsite/?q=admin/logs/status/php

What does -Indexes do? Prevent delivering the contents of a directory? Maybe this could be a problem because drupal has to search the directory for your theme. Your theme's name (the appended md5-hash number) will change with each changed value (so you can install different color themes theoretically).

ubl’s picture

Thanks for the link
If anyone would like to check out the settings in my php.ini file, please feel welcome
http://www.ulriklund.dk/phpini.html

About the php.ini file, I do not think I am allowed to configure it myself, but hopefully I can get my host to make the changes if needed.

I found out that if I just copy the png files into the theme I can change the colors but that seems a bit troublesome...

Those Indexes you are talking about where do I find out more about them?

ubl’s picture

My file-system is set to public.
And as a consequence of that people should be able to read what is in the files folder. (or am I wrong?)
E.g. view a picture!

But as far as I can see this is not the fact.
Does anyone know how I can change this?

Edit 2007-01-22
As far as I can se I've got the same problem as described below: php running in "SAFE MODE"

jiangxijay’s picture

This worked for me, too. No other changes required.

jmcneely’s picture

I get the same syndrome as others ... the preview changes but the site itself does not. It does create the files/color/garland-##md5hash##/ directory, and all the .png files in there. They are owned by "apache" and the permissions are OK.

Drupal's error log has "page not found" errors for files/color/garland-##md5hash##/style.css. When I look in that directory, there is no style.css file in it.

The error log also has php errors from when the script was trying to copy the menu-*.gif files and when it was trying to write the style.css file.

The php error messages are all variations on the theme:
fopen(): SAFE MODE Restriction in effect. The script whose uid is 10100 is not allowed to access /files/color/garland-fa72c025 owned by uid 48 in /modules/color/color.module on line 337.

I'm on a public host, and the sysadmin isn't likely to disable SAFE MODE in php.ini any time soon.

Is there any workaround for this?

projectspoint’s picture

Like you I have a similar problem ... but get a nice string of errors ...

* warning: chdir(): SAFE MODE Restriction in effect. The script whose uid/gid is 10721/500 is not allowed to access /home/g/e/oxymron_co_uk owned by uid/gid 99/99 in /home/g/e/oxymron.co_uk/modules/color/color.module on line 288.
* warning: fopen(files/color/minnelli-d42c8d40/style.css): failed to open stream: No such file or directory in /home/g/e/oxymron_co_uk/modules/color/color.module on line 337.
* warning: fwrite(): supplied argument is not a valid stream resource in /home/g/e/oxymron_co_uk/modules/color/color.module on line 338.
* warning: fclose(): supplied argument is not a valid stream resource in /home/g/e/oxymron_co_uk/modules/color/color.module on line 339.

can't change write permissions on the folder

Anyone advise on how this is fixed easily?

Thanks

Coy

dkatzman’s picture

Hi All,

I get the same SAFE MODE problem... I tried changing the .htaccess file (commented everything out) and chmoding all the directories that the bloody garland creates, but still no cake.

I want to try the directory-copy solution but I can't because I don't get any file created (only a folder) and installing locally... Well that's the last option.

Has anyone discovered how to fix this?

Thanks,
DK

  • www.mythos.es
  • ubl’s picture

    My problem was that that there was no public access to the "files" folder even though I had set the access to public.
    I threfore played with file ".haccess" in the files folder and out commented the following lines

    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
    #Options None
    #Options +FollowSymLinks

    As they seem to cause the problems

    I hope it is okay that I have done that!

    jiangxijay’s picture

    This worked for me, too. No other changes required.

    muddude’s picture

    Just thought I'd keep this thread up-to-date and say that this fix worked for me. Nuke lines 2 & 3 and everything works fine. Not sure what those lines were supposed to do...

    acdavenport’s picture

    Make sure you have your 'File System' settings set to 'Public' and NOT 'Private'. When I upgraded to 5.0 I couldn't understand why I could not adjust the colors until I found a note in the drupal documentation that referenced needing the file system set to pub in order to adjust the color settings. Seems like that shouldn't be an issue, but what ever... it works!

    theguy’s picture

    cracked it at last :-)
    after a sleepless night...

    Here's a workaruond, I'm not sure it would be the recommended one,
    but worked for me...

    1. installed Drupal 5.1 locally (using xampp)

    2. generated the garland theme with a chosen color.

    3. chmod trick from here
    http://drupal.org/node/102005#comment-178427

    4. copied style.css from the local files/color/garland-#md5-hash# to the
    same folder on the reomte server (no need to change the folder name to
    match the local one)

    5. verified that style.css was added to the remote server.

    6. Enter the site and.. voila...

    netchico@www.networkchico.net’s picture

    I have a drupal 5.1 install running on a free host and was unable to effectively alter the garland theme colors.
    I think I found a simple workaround though.

    • Make a copy of your local garland theme folder. /themes/garland
    • Rename this folder to reflect your new theme. /themes/Copy of garland >> /themes/garland_new
    • Log in to your drupal instalation as user/1
    • Click to configure garland. /admin/build/themes/settings/garland
    • Once you have the colors you want chosen click Save configuration
    • Give your server a few seconds (minutes?) to create the new files you need.
    • FTP to your hosting space and download the new folder /files/color/garland-#md5-hash#
    • Copy all of the files from the new garland-#md5-hash# folder into the new themes folder (/themes/garland_new) you created earlier. Place them all in the root of this directory. Overwrite as necessary.
    • Upload the new theme to the /themes directory. Be sure your folder permissions are set. (0755 works)
    • Return to your drupal install and reset the garland them back to the default. [Blue Lagoon (Default)] Click Save configuration
    • Return to the themes list /admin/build/themes
    • You should now be able to enable your new theme. Click Save configuration

    Cheers

    omergul’s picture

    If you have:

    Drupal 5.1
    Apache/2.2.3 (I think it would not be problem)
    PHP/5.2.0-8+etch3 (I think it would not be problem)
    In php.ini I have (it was by default ;) )
    memory_limit = 16M
    safe_mode = Off

    then
    Be sure you have the following:

    "files" folder in drupal root folder
    "tmp" folder in drupal root folder
    set chmod 666 files/ tmp/
    In "Administrator" -> "Site Configuration" -> "File System" just write folders name like this:
    File System Path: filles (do not write path e.g /var/www/files)
    Temporary directory: tmp (do not write path e.g /var/www/tmp)
    seletc "Public - files are available using HTTP directly."

    and save configuration.

    jefbak2’s picture

    This worked for me. Thanks.

    nbn-javaekspert’s picture

    Hi,

    I also had this problem, but none of the above really fixed the problems.
    I used drupal 5.1, apache 2.0, php 5.2 and suphp 0.6.1 as the software.

    I discovered that drupal actually created the files (files/color/garland-md5hash), as the correct user:group and permissions 700 (directories) and 600 (files).

    Then when it tries to display the theme, it cannot access the files. I changed the directories to 755 and files to 644, and it displayed the theme.

    Who is to blame I do not now, but that's what I did.

    Cheers
    /Niels

    schorrie’s picture

    anyone some more solutions

    tried really everything,

    but, every time a change the color scheme,

    layout of the theme are gone
    all colors of the theme are gone

    really desperate

    osomphane’s picture

    Yes
    There is another .htaccess file in sites/default or sites/default/files I think. You have to disable the two options in there as well to make files accessible to public users.

    eelkeboezeman’s picture

    for me. my "root" .htaccess had everything commented out properly, but in /sites/default/files/garland-NUMBER was an .htaccess file in which I commented out the two lines. et voila, it worked.

    running 6.x btw

    pschalkx’s picture

    I also have my site hosted at One.com and it worked for me:

    Commented out the following two lines in /sites/default/files/.htaccess:
    # Options None
    # Options +FollowSymLinks

    Thanks to all!

    Philip