Submitted by virtuose on
salut tout le monde
J'utilise Drupal 6.2, lors que j'ai voulu installe le module TinyMCE et IMCE tout s est bien passe. Cependant, je ne voyais pas le "Browser image" dans l'onglet general de l'option Insert/edit image. J'ai regle le pb avec la methode suivante : 1. il faut utiliser un theme qui a template.php car il faut ajouter la fonction suivante dans le fichier :
<?php
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
static $access, $integrated;
if (!isset($access)) {
$access = function_exists('imce_access') && imce_access();
}
$init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
if ($init && $access) {
$init['file_browser_callback'] = 'imceImageBrowser';
if (!isset($integrated)) {
$integrated = TRUE;
drupal_add_js("
function imceImageBrowser(field_name, url, type, win) {
tinyOpenerWin = win, tinyTargetField = field_name;
if (typeof tinyImceWin == 'undefined' || tinyImceWin.closed) {
tinyImceWin = window.open(Drupal.settings.basePath +'?q=imce', '', 'width=760,height=560,resizable=1');
tinyImceWin['imceOnLoad'] = function () {
tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1));
tinyImceWin.imce.setSendTo(Drupal.t('Send to @app', {'@app': 'TinyMCE'}), function(file) {
window.focus();
tinyOpenerWin.focus();
$('#width', tinyOpenerWin.document).val(file.width);
$('#height', tinyOpenerWin.document).val(file.height);
$('#'+ tinyTargetField, tinyOpenerWin.document).val(file.url).focus();
});
}
}
else {
tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1));
}
tinyImceWin.focus();
}
", 'inline');
}
}
return $init;
}
?>
Source : http://drupal.org/node/241753
Une fois mon "browser image" installe, je ne pouvais pas voir mes images. Pourtant le code est bien la dans mon node ?q=node/20 et le code est le suivant : "
". Mon upload fonctionne correctement car j'ai pu envoyer les images et ils ne sont pas corrompu car je suis capable de les voir une fois telecharger. Alors, je suis aller voir dans le error.log, et je me suis apercu de l'erreur suivante :
/var/www/web6/web/sites/test2.festivalequestre.com/.htaccess: Options not allowed here, referer: http://test2.festivalequestre.com/?q=node/20
[Tue May 06 11:16:42 2008] [alert] [client 216.137.96.7] /var/www/web6/web/sites/test2.festivalequestre.com/.htaccess: Options not allowed here, referer: http://test2.festivalequestre.com/?q=node/20
j'ai fait une recherche sur le net et j'ai trouvé le même problème a l'adresse suivante : http://howtoforge.com/forums/showthread.php?t=788
Il mentionne d'ajouter le code suivant dans le .htaccess
Options +Includes +FollowSymlinks -Indexes
===============HERE==============
AllowOverride All
=================================
Order allow,deny
Allow from all
Deny from all
c'est fait mais ca fonctionne pas plus.
alors, j aimerais savoir sur quel piste me lancer afin de corriger le probleme. Hum... je dois dire que les .htaccess, je ne suis pas sure que j ai les bons pour linstallation. j expliques lors que j'ai installe Drupal 6, je crois avoir effacer des .htacces qui ont ete par defaut et j ai fait ou copier des .htaccess un peu partout afin de corriger des pb d erreurs (images, sites). a t il un moment de savoir ou ils vont et/ou recommencer a neuf sans tout perdre. :)
Je suis enchanté de voir la nouvelle version Drupal 6.2. Beau travail tout le monde, c est genial. :)
fred s.
hé, j'ai peut etre une
Permalien Soumis par virtuose le 6 Mai, 2008 - 22:29
hé, j'ai peut etre une piste...
une fois termine mon installation avec Drupal 6 et apache 2.2.6, j'ai une erreur suivante:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@virtu-ose.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.6 (Fedora) Server at test2.festivalequestre.com Port 80
cependant, lorsque je modifie le nom de .htaccess exemple pour .htaccess2, le site fonctionne très bien. Alors j'en conclus que le .htaccess n'est pas bien configurer. Si je desactives le .htaccess, et que j'essaie de visualiser le node suivant l'adresse suivante avec une image http://test2.festivalequestre.com/?q=node/20 l'image n'apparaît pas. est ce que c est relie avec le .htaccess.
Mon .htaccess est le suivant :
#
Apache/PHP/Drupal settings:
#
Protect files and directories from prying eyes.
Order allow,deny
Don't show directory listings for URLs which map to a directory.
Options -Indexes
Follow symbolic links in this directory.
Options +FollowSymLinks
Customized error messages.
ErrorDocument 404 /index.php
Set the default handler.
DirectoryIndex index.php
Override PHP settings. More in sites/default/settings.php
but the following cannot be changed at runtime.
PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
Various rewrite rules.
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example.com$ [NC]
# RewriteRule ^(.)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
# RewriteRule ^(.)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Options +Includes +FollowSymlinks -Indexes
AllowOverride ALL #Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Deny from all
</Files>
$Id: .htaccess,v 1.90 2007/10/05 14:43:23 dries Exp $
je suis pas pro de unix qqun pourrait me donner un coup de pouce.
fred s.
finalement c'est pas nous
Permalien Soumis par virtuose le 12 Mai, 2008 - 20:54
finalement c'est pas nous qui l'avons trouvé mais les spécialistes.
Il fallait activé les .htaccess sur le serveur.
voici l'information que notre spécialistes nous a laissé
Source:
http://ca3.php.net/configuration.changes
Option sur le serveur Apache
AllowOverride Indexes AuthConfig Limit FileInfo Options
salutation et bien à vous !
frederic s.