chameleon doesn't save changes at server

chameleon doesn't save changes at server

by Guido van der Waals -
Number of replies: 14

Tonight I made a upgrade from my site to moodle 1.6 beta5 2006050502.

I changed the backgroundcolor in tr. section. I chosed "save these changes to the server". But the changes were very temperary. On the server was the file user_styles.css not touched.

Average of ratings: -
In reply to Guido van der Waals

Re: chameleon doesn't save changes at server

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Guido,

Please check the permissions on the files user_styles.css and temp_user_styles.css.
In reply to Helen Foster

Re: chameleon doesn't save changes at server

by Guido van der Waals -

Sorry, my permissions are 644 rw-r--r-.

Do I have to change also the group-permissions in writing by using 664? Maybe is 646 a better one?

In reply to Guido van der Waals

Re: chameleon doesn't save changes at server

by Urs Hunkler -
Picture of Core developers

Guido,

If you set file permissions correctly to 644 rw-r--r- your "web server user" must be the owner to be able to write to the files. If you have for security reasons set a different owner for your server and for all Moodle files you must change the owner of the two Chameleon css files to the "web server user".

I hope that helps.
Urs

In reply to Urs Hunkler

Re: chameleon doesn't save changes at server

by mark furrer -

Hi Urs

I do have the same problem, but I do not know where the change the owner of the css files.

Permissions are like above 644.

Can you give me any help?

Thanks

Mark

In reply to mark furrer

Re: chameleon doesn't save changes at server

by ned moltoya -
Hi,

same problem here.

chmod 666 user_styles.css
chown nobody:nobody user_styles.css

or

chown lighttpd:lighttpd user_styles.css

(lighttpd is my web server user)

why does it say "Styles have been updated to the server" when they haven't?

Thanks,
Ned
In reply to ned moltoya

Re: chameleon doesn't save changes at server

by Urs Hunkler -
Picture of Core developers

Ned,

you ask "why does it say "Styles have been updated to the server" when they haven't?".

We will check if Chameleon can report the write permission state of the two CSS files.

Urs

In reply to mark furrer

Re: chameleon doesn't save changes at server

by Urs Hunkler -
Picture of Core developers

Mark,

please check if your Chameleon directory's permissions are drwxr-xr-x (755).

Please try if writing works when you set -rw-rw-rw- (666) for both CSS files "user_styles.css" and "temp_user_styles.css".

Does Chameleon save the files with this permissions?

Urs

In reply to Urs Hunkler

Re: chameleon doesn't save changes at server

by ned moltoya -
Hi Urs,

thanks for the hints but it's still a no-go for me.

Regards,
Ned
In reply to ned moltoya

Re: chameleon doesn't save changes at server

by ned moltoya -
Hi,

it's working for me now. As it turned out, it had nothing to do with permissions at all (thanks guys!). In "/theme/chameleon/ui/chameleon_js.php" I changed this line:

REMOTE_URI: '<?php echo substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); ?>css.php?id=<?php echo (isset($_GET['id'])) ? (int) $_GET['id'] : 0; ?>',


to this:

REMOTE_URI: '<?php echo substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); ?>/theme/chameleon/ui/css.php?id=<?php echo (isset($_GET['id'])) ? (int) $_GET['id'] : 0; ?>',


I don't see how the theme could have ever worked without this fix, in spite of reports to the contrary.

Best,
Ned

In reply to ned moltoya

Re: chameleon doesn't save changes at server

by Andrew Walker -
I don't think there is any mistake in how REMOTE_URI is setup

chameleon_js.php should live inside the ui folder of the theme so from in this file $_SERVER['PHP_SELF'] should always be something like,

/moodle/theme/chameleon-theme-name/ui/chameleon_js.php

so from

REMOTE_URI: '<?php echo substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); ?>/css.php?id=<?php echo (isset($_GET['id'])) ? (int) $_GET['id'] : 0; ?>'

you should end up with something that looks like this:

REMOTE_URI: '/moodle/theme/chameleon-theme-name/ui/css.php?id=0'

(the substr, strrpos stuff just removes the chameleon_js.php part from the path)

Do you have chameleon_js.php in a different location?
In reply to Andrew Walker

Re: chameleon doesn't save changes at server

by ned moltoya -
Hi Andrew,

I see what you mean. However, chameleon_js.php lives in the ui folder of the theme and without the small fix I applied, my web server (lighttpd) looks for css.php in the web server root instead of in '/moodle/theme/chameleon-theme-name/ui/'

Best,
Ned
In reply to ned moltoya

Re: chameleon doesn't save changes at server

by Andrew Walker -
Does this the php.ini setting mentioned here help?

http://lighttpd.net/documentation/fastcgi.html#configuring-php

Average of ratings: Useful (1)