Problème thème

Information importante

En raison d'un grand nombre d'inscriptions de spammers sur notre site, polluant sans relache notre forum, nous suspendons la création de compte via le formulaire de "sign up".

Il est néanmoins toujours possible de devenir adhérent•e en faisant la demande sur cette page, rubrique "Inscription" : https://www.drupal.fr/contact


De plus, le forum est désormais "interdit en écriture". Il n'est plus autorisé d'y écrire un sujet/billet/commentaire.

Pour contacter la communauté, merci de rejoindre le slack "drupalfrance".

Si vous voulez contacter le bureau de l'association, utilisez le formulaire disponible ici, ou envoyez-nous un DM sur twitter.

Bonjour je suis assez nouveau sur drupal, et j'ai voulu changer un thème mais je ne peux car j'ai ce message d'erreur : The directory files does not exist.

Pourriez-vous m'aider ?

Version de Drupal : 

oui oui mais chaque fois que je choisi le "rayon vert" ça me fais le même problème :

* warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 252.
* warning: copy(files/color/minnelli-608b0c5c/menu-collapsed.gif) [function.copy]: failed to open stream: Success in /home/drupal/www/modules/color/color.module on line 252.
* warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 252.
* warning: copy(files/color/minnelli-608b0c5c/menu-expanded.gif) [function.copy]: failed to open stream: Success in /home/drupal/www/modules/color/color.module on line 252.
* warning: copy() [function.copy]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 252.
* warning: copy(files/color/minnelli-608b0c5c/menu-leaf.gif) [function.copy]: failed to open stream: Success in /home/drupal/www/modules/color/color.module on line 252.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 401.
* warning: imagepng() [function.imagepng]: Invalid filename in /home/drupal/www/modules/color/color.module on line 401.
* warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 526 is not allowed to access /home/drupal/www/files/color/minnelli-608b0c5c owned by uid 99 in /home/drupal/www/modules/color/color.module on line 338.
* warning: fopen(files/color/minnelli-608b0c5c/style.css) [function.fopen]: failed to open stream: Success in /home/drupal/www/modules/color/color.module on line 338.
* warning: fwrite(): supplied argument is not a valid stream resource in /home/drupal/www/modules/color/color.module on line 339.
* warning: fclose(): supplied argument is not a valid stream resource in /home/drupal/www/modules/color/color.module on line 340.

Le gros probleme que je vois est que tu n'as pas le droit d'utiliser certaines fonction PHP a cause des restrictions du mode safe_mode mis en place par ton hebergeur...

Ca c'est un gros probleme je pense et une grosse restriction quant a l'usage de Drupal chez ton hebergeur.

Y a un paquet de < href="http://drupal.org/search/node/safe_mode">demandes a ce sujet

Il s'agit d'un problème lié à une fonction du SAFE MODE de PHP5, qui consiste à n'autoriser un script à accéder aux seuls fichiers qui sont du même utilisateur et/ou du même groupe que lui.

Le problème chez toi c'est que Apache tourne sous l'uid 99 (probablement www-data ou nobody), alors que les scripts de Drupal appartiennent à l'uid 526. Lorsque Drupal crée un fichier dans files, c'est en fait Apache qui le crée, il obtient donc l'uid d'Apache (99).

Je vois deux solutions, qui nécessite que tu changes la configuration de PHP :

(1), la plus simple, c'est d'ajouter le répertoire files aux répertoires exclus du SAFE MODE (ie. paramètre safe_mode_include_dir

(2) activer le flag g+s sur le répertoire files (chmod g+s) pour que les fichiers créés dans ce repertoire appartiennent automatiquement au groupe propriétaire du répertoire, et active le paramètre safe_mode_gid pour limiter le SAFE MODE à une comparaison des groupes et non des utilisateurs.