Forum CMS Made Simple FR

Version complète : [Résolu] Problème url news suite à MAJ 1.2.4 -> 1.9.4.2 (err 500)
Vous consultez actuellement la version basse qualité d’un document. Voir la version complète avec le bon formatage.

La Fabrik

Citation :#~~~~~ DEBUT BLOC A NE PAS SUPPRIMER ~~~~~
#~ Version du CMS: #1.9.4.2
#~ Url du site : www.databack.fr
#~ Hébergeur / Soft : 1&1 mutualisé
#~ Informations Système :
#~ ----------------------------------------------
#~ Cms Version: 1.9.4.2
#~ Installed Modules:
#~ * CMSMailer: 2.0.1
#~ * FileManager: 1.1.0
#~ * MenuManager: 1.7.6
#~ * nuSOAP: 1.0.2
#~ * Printing: 1.1.2
#~ * ThemeManager: 1.1.4
#~ * TinyMCE: 2.8.4
#~ * FormBuilder: 0.5.1
#~ * NMS: 1.0.0
#~ * dboptimizer: 1.11
#~ * Bookmarks: 2.0.1
#~ * ModuleManager: 1.4.2
#~ * News: 2.11.3
#~ Config Information:
#~ * php_memory_limit:
#~ * process_whole_template: false
#~ * output_compression: false
#~ * max_upload_size: 20000000
#~ * default_upload_permission: 664
#~ * url_rewriting: mod_rewrite
#~ * page_extension: .html
#~ * query_var: page
#~ * image_manipulation_prog: GD
#~ * auto_alias_content: true
#~ * locale:
#~ * default_encoding:
#~ * admin_encoding: utf-8
#~ * set_names: false
#~ Php Information:
#~ * phpversion: 5.2.17
#~ * md5_function: On (Vrai)
#~ * gd_version: 2
#~ * tempnam_function: On (Vrai)
#~ * magic_quotes_runtime: Off (Faux)
#~ * E_STRICT: 0
#~ * memory_limit: 90M
#~ * max_execution_time: 50000
#~ * output_buffering: 0
#~ * safe_mode: Off (Faux)
#~ * file_uploads: On (Vrai)
#~ * post_max_size: 8M
#~ * upload_max_filesize: 40M
#~ * session_save_path: /tmp (1777)
#~ * session_use_cookies: On (Vrai)
#~ * xml_function: On (Vrai)
#~ Server Information:
#~ * Server Api: cgi
#~ * Server Db Type: MySQL (mysql)
#~ * Server Db Version: 5.0.91
#~ ----------------------------------------------
#~~~~~ FIN BLOC A NE PAS SUPPRIMER ~~~~~



Bonjour à tous,
je viens de mettre à jour ce site de la version 1.2.4 à la dernière 1.9.4.2 sans problème particulier à l'exception des actualités.
C'est en fait à cause du module actualité que je suis passé sur la dernière version (de toute façon il fallait le faire pour la sécurité).
Ce module actu venait juste d'être installé mais j'avais un problème avec les dates.
Ce problème est résolu avec la nouvelle version, cependant j'ai dû ajouter à la main dans la table news le champs 'news_url' (de mémoire) qui n'était pas présent dans la base (après la MAJ).

Voilà le problème, le lien 'lire la suite' pointe vers une url de type : http://www.databack.fr/news/3/116/Databa...e-SSD.html
qui provoque une erreur 500.

Voici le contenu du fichier config.php
Code :
<?php


#CMS Made Simple Configuration File
#Please clear the cache (Site Admin->Global Settings in the admin panel)
#after making any changes to path or url related options

#-----------------
#Behaviour Settings
#-----------------

# These settings will effect the overall behaviour of the CMS application, please
# use extreme caution when editing these.  Additionally, some settings may have
# no effect on servers with significantly restricted configurability.

# Warning: This option is deprecated and will be removed in later versions oF CMSMS.
# If you are experiencing problems with php memory limit errors, then you may
# want to try enabling and/or adjusting this setting.
# Note: Your server may not allow the application to override memory limits.
$config['php_memory_limit'] = '';

# In versions of CMS Made Simple prior to version 1.4, the page template was processed
# in it's entirety.  This behaviour was later changed to process the head portion of the
# page template after the body.  If you are working with a highly configured site that
# relies significantly on the old order of smarty processing, you may want to try
# setting this parameter to true.
$config['process_whole_template'] = false;

# CMSMS Debug Mode?  Turn it on to get a better error when you
# see {nocache} errors, or to allow seeing php notices, warnings, and errors in the html output.
# This setting will also disable browser css caching.
$config['debug'] = false;

# Output compression?
# Turn this on to allow CMS to do output compression
# this is not needed for apache servers that have mod_deflate enabled
# and possibly other servers.  But may provide significant performance
# increases on some sites.  Use caution when using this as there have
# been reports of incompatibilities with some browsers.
$config['output_compression'] = false;

# Timezone setting
# PHP 5.3 requires that timezones be set at the server level.
# This variable can be used to set your sites timezone.
# Valid values for this variable can be found at:
# http://www.php.net/manual/en/timezones.php
# If this field is empty, no timezone will be set
$config['timezone'] = '';

#-----------------
#Database Settings
#-----------------

#This is your database connection information.  Name of the server,
#username, password and a database with proper permissions should
#all be setup before CMS Made Simple is installed.
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'xxx';
$config['db_username'] = 'xx';
$config['db_password'] = 'xxx';
$config['db_name'] = 'xxx';
#Change this param only if you know what you are doing
$config["db_port"] = '';


#If app needs to coexist with other tables in the same db,
#put a prefix here.  e.g. "cms_"
$config['db_prefix'] = 'cmsms_';

#Use persistent connections?  They're generally faster, but not all hosts
#allow them.
$config['persistent_db_conn'] = false;

#Use ADODB Lite?  This should be true in almost all cases.  Note, slight
#tweaks might have to be made to date handling in a "regular" adodb
#install before it can be used.
$config['use_adodb_lite'] = true;

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.databack.fr';

#SSL URL.  This is used for pages that are marked as secure.
$config['ssl_url'] = 'https://www.databack.fr';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/homepages/38/d244250484/htdocs';

#Name of the admin directory
$config['admin_dir'] = 'BckOff-CMS';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/homepages/38/d244250484/htdocs/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/homepages/38/d244250484/htdocs/uploads';

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 20000000;

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

#------------------
#Usability Settings
#------------------

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

#Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

#------------
#URL Settings
#------------

#What type of URL rewriting should we be using for pretty URLs?  Valid options are:
#'none', 'internal', and 'mod_rewrite'.  'internal' will not work with IIS some CGI
#configurations. 'mod_rewrite' requires proper apache configuration, a valid
#.htaccess file and most likely {metadata} in your page templates.  For more
#information, see:
#http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs#Pretty_URL.27s
$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

#--------------
#Image Settings
#--------------

#Which program should be used for handling thumbnails in the image manager.
#See http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Content/Image_Manager for more
#info on what this all means
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '/homepages/38/d244250484/htdocs/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images';

#SSL URL.  This is used for pages that are marked as secure.
$config['ssl_uploads_url'] = 'https://www.databack.fr/uploads';

#------------------------
#Locale/Encoding Settings
#------------------------

#Locale to use for various default date handling functions, etc.  Leaving
#this blank will use the server's default.  This might not be good if the
#site is hosted in a different country than it's intended audience.
$config['locale'] = '';

#In almost all cases, default_encoding should be empty (which defaults to utf-8)
#and admin_encoding should be utf-8.  If you'd like this to be different, change
#both.  Keep in mind, however, that the admin interface translations are all in
#utf-8, and will be converted on the fly to match the admin_encoding.  This
#could seriously slow down the admin interfaces for users.
$config['default_encoding'] = '';
$config['admin_encoding'] = 'utf-8';

#This is a mysql specific option that is generally defaulted to true.  Only
#disable this for backwards compatibility or the use of non utf-8 databases.
$config['set_names'] = false;

# URL of the Admin Panel section of the User Handbook
# Set none if you want hide the link from Error
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel';

#------------------------
#Miscelaneous Settings
#------------------------

#Add performance information (in the form of an HTML comment) to the
#bottom of all generated pages.  Note, this may cause problems with validation
#or with advanced AJAX requests where only portions of a page are requested.
#This variable just needs to exist, value is irrelevant.
#$config['show_performance_info'] = 'anything';

?>

et le htaccess
Code :
#php5.2
#SetEnv PHP_VER 5
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off

#Options +FollowSymLinks

# To prevend E_STRICT problems with PHP 5.3+ you can uncomment the following lines
# Note: These settings should only be enabled for production sites!
#php_flag display_startup_errors 0
#php_flag display_errors 0
#php_flag html_errors 0
#php_value docref_root 0
#php_value docref_ext 0

<IfModule mod_rewrite.c>
RewriteEngine On
Options +FollowSymlinks

#Utilise seulement le site avec www
RewriteCond %{HTTP_HOST} ^databack.fr$
RewriteRule ^(.*)   http://www.databack.fr/$1  [QSA,L,R=301]

#url rewrite
RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]

#redirection ancien site
RedirectPermanent /recuperation.php http://www.databack.fr/que-faire.html
RedirectPermanent /formulaire.php http://www.databack.fr/devis-recuperation-donnee.html
RedirectPermanent /charte.php http://www.databack.fr/charte-qualite.html
RedirectPermanent /expedition.php http://www.databack.fr/expedition-donnees-informatiques.html
RedirectPermanent /contact.php http://www.databack.fr/contact.html
RedirectPermanent /references.php http://www.databack.fr/references.html
RedirectPermanent /databack.php http://www.databack.fr/a-propos-de-databack.html
RedirectPermanent /pdfs/Charte_de_bonnes_pratiques.pdf http://www.databack.fr/uploads/pdf/Charte_de_bonnes_pratiques.pdf
RedirectPermanent /databack/index.php http://www.databack.fr/
RedirectPermanent /databack/charte.php http://www.databack.fr/charte-qualite.html
RedirectPermanent /recuperation-donnees.html http://www.databack.fr/que-faire.html
RedirectPermanent /databack/formulaire.php http://www.databack.fr/devis-recuperation-donnee.html
RedirectPermanent /databack/index/reparation-disque-dur.html http://www.databack.fr/disque-dur.html
RedirectPermanent /databack/databack.php http://www.databack.fr/a-propos-de-databack.html
RedirectPermanent /reparation-disque-dur.html http://www.databack.fr/disque-dur.html
#RedirectPermanent /index.html http://www.databack.fr/index.php
RedirectPermanent /donnees-perdues.html http://www.databack.fr/que-faire.html

#redirection suite au renommage des pages SEO friendly
RedirectPermanent /a-propos-de-databack.html http://www.databack.fr/databack-recuperation-donnees.html
RedirectPermanent /bandes-magnetiques.html http://www.databack.fr/recuperation-donnees-bandes-magnetiques.html
RedirectPermanent /charte-qualite.html http://www.databack.fr/charte-qualite-recuperation-donnees.html
RedirectPermanent /charte.php http://www.databack.fr/charte-qualite-recuperation-donnees.html
RedirectPermanent /electronique.html http://www.databack.fr/recuperation-donnees-panne-electronique.html
RedirectPermanent /logique.html http://www.databack.fr/recuperation-donnees-panne-logique.html
RedirectPermanent /memoires-flash.html http://www.databack.fr/recuperation-donnees-memoires-flash.html
RedirectPermanent /ordinateur-portable.html http://www.databack.fr/recuperation-donnees-ordinateur-portable.html
RedirectPermanent /partenaire.html http://www.databack.fr/partenaire-recuperation-donnees.html
RedirectPermanent /plan-du-site.html http://www.databack.fr/plan-recuperation-donnees.html
RedirectPermanent /raid-1.html http://www.databack.fr/recuperation-donnees-raid-1.html
RedirectPermanent /raid-10.html http://www.databack.fr/recuperation-donnees-raid-10.html
RedirectPermanent /perte-de-donnees.html http://www.databack.fr/perte-donnee-que-faire.html
RedirectPermanent /systeme-raid.html http://www.databack.fr/recuperation-donnees-systeme-raid.html
RedirectPermanent /mac-apple.html http://www.databack.fr/recuperation-donnees-mac-apple.html
RedirectPermanent /panne-mecanique.html http://www.databack.fr/recuperation-donnees-panne-mecanique.html
RedirectPermanent /migrations-de-donnees.html http://www.databack.fr/migrations-de-donnees-securisees.html
RedirectPermanent /raid-1-2.html http://www.databack.fr/recuperation-donnees-raid-5.html
RedirectPermanent /systeme-raid-nas-san.html http://www.databack.fr/recuperation-donnees-systeme-raid-nas-san.html
RedirectPermanent /cd-dvd-zip-disquette.html http://www.databack.fr/recuperation-donnees-cd-dvd-zip-disquette.html
RedirectPermanent /references.html http://www.databack.fr/references-recuperation-donnees.html
RedirectPermanent /contact.html http://www.databack.fr/contact-recuperation-donnees.html
RedirectPermanent /disque-dur.html http://www.databack.fr/recuperation-donnees-disque-dur.html
RedirectPermanent /raid-0.html http://www.databack.fr/recuperation-donnees-raid-0.html
RedirectPermanent /securite-donnees-sensibles.html http://www.databack.fr/securite-recuperation-donnees-sensibles.html
RedirectPermanent /partenaire-recuperation-donnee.html http://www.databack.fr/partenaire-recuperation-donnees.html

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

</IfModule>

<IfModule mod_header.c>
# Disable ETags
Header unset ETag
FileEtag None
</IfModule>

<IfModule mod_deflate.c>
# Compress css, plaintext, xml, gif, and images in transport.
AddOutputFilterByType DEFLATE text/css text/plain text/xml image/gif image/jpeg image/png
</IfModule>

<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_header.c>
  # Setting cache control to public allowes proxy servers to cache the items too.
  Header set Cache-Control "public"
</IfModule>
</FilesMatch>
</IfModule>

Avez-vous déjà rencontré ce type de problème ?
Voyez-vous quelque chose dans le htaccess ou dans le fichier config qui peut provoquer ceci ?

Merci d'avance à ceux qui ont lu ce long message jusqu'au bout et encore + à ceux qui pourront m'aiguiller / dépanner !
Bonne journée

La Fabrik

ha une piste peut-etre : je lis que ma version du module news est la 2.11.3 alors que dans le gestionnaire de module la dernière est la 2.8.3 !?
Etrange non ??
Je vais chercher de ce coté là.

EDIT : c'est le gestionnaire qui doit déconner..je suis à jour la v 2.11.3 existe bien.
Supprime les données de connexion à ta bd (password en clair).
Code :
#url rewrite
RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]
ne serait pas de trop ?

La Fabrik

Jean le Chauve a écrit :Supprime les données de connexion à ta bd (password en clair).
Quel abruti je fais..plus l'habitude des forums moi Wink
Un grand merci Jean le Chauve

La Fabrik

Jean le Chauve a écrit :
Code :
#url rewrite
RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]
ne serait pas de trop ?
Oui je l'ai vu en comparant à d'autre fichier mais quand je le met en commentaire j'ai plus une page sauf l'index qui focntionne (erreur 500 partout).

La Fabrik

ma page de détail est précisée dans la balise et pointe vers cette page : http://www.databack.fr/actualites.html

La Fabrik

Il n'y a plus de ligne spéciale pour les news dans le htaccess maintenant ? c'est normal ça ?

La Fabrik

Quand je met une url dans le champ URL, ca fonctionne (sauf qu'il prend pas ma page détail en compte j'ai l'impression). Je vais tester un truc puis je passe le post en [RESOLU] bien que ce soit pas le comportement normal je pense.
oui, c'est géré en interne du module depuis les 1.6.x il me semble.

donc si tu prends pour exemple le site de cmsmadesimple, tu dois avoir dans ton .htaccess uniquement :


Code :
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

La Fabrik

Si je ne laisse que ça j'ai que du 500, je laisse comme ça j'ai réussit à bricoler pour avoir le comportement souhaité,
il suffit juste de remplir le champs URL,
et pour la page détail qui n'est pas prise j'y palie en faisant une capture d'une balise utilisateur qui me retourne la page en question et suivant que je suis sur une actu ou sur la page d'accueil j'affiche certains blocs a droite...
comme tu le sens mais ca reste du bricolage Wink

La Fabrik

Oui je sais bien, j'y reviendrai peut-etre plus tard, là je fais dans l'urgence les clients ont du adword qui ramène pas mal de prospects alors le but c'est que ca tourne de suite :p
Merci pour votre aide !
je t'en prie Wink

si tu reviens, re-ouvre un autre topic en pointant celui ci, je ferme en attendant Wink