Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On my web hosting with
open_basedir (set to my homedir)
safe_mode On
safe_mode_gid On
i had problem with configure garland theme into new colors. I have get numerous errors related with mkdir() and copy() files.
I have examine this problem and i get this solution:
In color.module is on line 214
$paths['target'] = $paths['color'] .'/'. $id .'/';
On my hosting function mkdir() don't allow this but if i change
$paths['target'] = $paths['color'] .'/'. $id;
mkdir() work with no problem.
There is $paths['target'] used too in some more lines - i moddified this lines with $paths['target'] . '/'
and now works color.module without problem.
Comment | File | Size | Author |
---|---|---|---|
#3 | color.module_1.patch | 1 KB | havran |
#1 | color.module_0.patch | 2.1 KB | havran |
Comments
Comment #1
havran CreditAttribution: havran commentedPatch attached.
Comment #2
Steven CreditAttribution: Steven commentedOr you could just add the slash to the target path after doing the mkdir. That way, you avoid inserting slashes everywhere. Also, the code style is bad.
Comment #3
havran CreditAttribution: havran commentedOk, i have attached modified patch.
Comment #4
havran CreditAttribution: havran commentedPlease get some attention for this simple task. :) I had downloaded latest version of Drupal 5 (dev) and this error is still here. This simple patch working.
Comment #5
Dries CreditAttribution: Dries commentedCode looks good now but I can't reproduce the problem. Maybe someone else can test this patch?
Comment #6
havran CreditAttribution: havran commentedMaybe is problem in my webhosting specific PHP and/or Apache configuration. Simple example - mkdir('some/new/directory/') for some reason don't working, do not create directory and i get errors - mkdir('some/new/directory') working perfect.
Comment #7
havran CreditAttribution: havran commentedAfter some searching on Google
http://www.google.com/search?q=php+mkdir+trailing+slash+problem&ie=utf-8...
Maybe i have source of this problem, my provider has modified PHP
But I think use no trailing slash in mkdir() is not bad idea.
Comment #8
drummLooks like this was committed.
Comment #9
drummNo, it hasn't, I just confused myself.
Comment #10
drummDoesn't hurt anything by being there, code style is good, and it fixes some versions of PHP. COmmitted to HEAD.
Comment #11
havran CreditAttribution: havran commentedThanks.
Comment #12
(not verified) CreditAttribution: commentedComment #13
dkatzman CreditAttribution: dkatzman commentedThis SAFE MODE THING is so frustrating guys... After MONTHS noone has come up with a usable (by all) unswer to this and the derived problems (like changing colors to Garland)?
I tried the fix here but the code in my color.module was already identical to the fix you propose... Guess I have an updated version...
Any new ideas? Thanks in advance!
D. KATZMAN, MBA
CEO, The Mythos Group
# www.secretia.com
# www.unmentor.com
# www.mythos.es
# www.jewishculturela.org
# www.profesorblog.com
# www.drbolsa.com
# www.certifik.org
Comment #14
Heine CreditAttribution: Heine commentedPlease open a new issue about your problem. And please, cut back on the signature.