Renouvellement Mot de passe
Renouvellement Mot de passe
Bonjour à tous !
J'ai un problème lors de la demande de renouvellement de mot de passe : lorsque que le client clique sur "Mot de passe perdu ?", tout se passe bien, il reçoit bien mail afin de renouveller son mot de passe mais là plusieurs erreur s'affcichent :
- Warning: include_once(../inc/phpm_ext.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/inc/mail.inc.php on line 35
- Warning: include_once() [function.include]: Failed opening '../inc/phpm_ext.inc.php' for inclusion (include_path='.:/opt/php/lib/php') in /home/www/web/smi/inc/mail.inc.php on line 35
- Warning: include_once(../classes/phpmailer/class.pop3.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/web/smi/inc/mail.inc.php on line 36
- Warning: include_once() [function.include]: Failed opening '../classes/phpmailer/class.pop3.php' for inclusion (include_path='.:/opt/php/lib/php') in /home/www/web/smi/inc/mail.inc.php on line 36
- Fatal error: Class 'SMIMailer' not found in /home/www/web/smi/inc/mail.inc.php on line 568
Quelqu'un a une idée ?
J'ai un problème lors de la demande de renouvellement de mot de passe : lorsque que le client clique sur "Mot de passe perdu ?", tout se passe bien, il reçoit bien mail afin de renouveller son mot de passe mais là plusieurs erreur s'affcichent :
- Warning: include_once(../inc/phpm_ext.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/inc/mail.inc.php on line 35
- Warning: include_once() [function.include]: Failed opening '../inc/phpm_ext.inc.php' for inclusion (include_path='.:/opt/php/lib/php') in /home/www/web/smi/inc/mail.inc.php on line 35
- Warning: include_once(../classes/phpmailer/class.pop3.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/web/smi/inc/mail.inc.php on line 36
- Warning: include_once() [function.include]: Failed opening '../classes/phpmailer/class.pop3.php' for inclusion (include_path='.:/opt/php/lib/php') in /home/www/web/smi/inc/mail.inc.php on line 36
- Fatal error: Class 'SMIMailer' not found in /home/www/web/smi/inc/mail.inc.php on line 568
Quelqu'un a une idée ?
Effectivement le fichier est bien présent, voici son contenu :
Merci de votre aide
Code : Tout sélectionner
<?php
/****************************************************************************************
SMI (Services Maintenance Interventions) est une gestion libre de maintenance et de SAV
Version 0.9.9
Copyright (C) 2006-2008 Sylvain FATOME
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program
(in the directory docs);
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
Contact : galawa@free.fr
Web : http://smitst.homelinux.com
****************************************************************************************/
// Vérification des tentatives de hack
$pos=strpos($_SERVER['PHP_SELF'],"inc.php");
if ($pos===FALSE)
$ok_inc=TRUE;
else
$ok_inc=FALSE;
if ($ok_inc==FALSE) header("Location: ../index.php");
/*****************************************************/
/* Fonctions d'extension de la classe PHPMailer */
/*****************************************************/
class SMIMailer extends PHPMailer
{
function init_PHPM()
{
global
$admin_name,
$admin_mail,
$smtp_nom,
$smtp_secure,
$smtp_port,
$smtp_login,
$smtp_mdp;
$this->Host = $smtp_nom;
$this->Port = $smtp_port;
if (trim($smtp_login)<>"")
{
$this->Username = $smtp_login;
$this->Password = $smtp_mdp;
$this->SMTPAuth = true;
if (trim($smtp_secure)<>"")
{
$this->SMTPSecure = $smtp_secure;
}
}
$this->CharSet='iso-8859-15';
$this->IsHTML= true;
// $this->SMTPDebug = true; // Pour déboggage
$this->WordWrap = 75;
$this->Mailer = "smtp";
$this->AltBody = "Pour visualiser ce message, merci d'utiliser un gestionnaire de mails compatible HTML.";
// Entête de l'email
$this->Priority = 3;
//Expédié par
$this->From = $admin_mail;
$this->FromName = $admin_name;
$this->Sender = $admin_mail;
}
}
?>
ok, j'ai compris : problème de chemin par rapport à la racine.
On s'en occupe début de semaine et je poste un patch.
Bonne soirée.
Edit - modif 30/11/08 :
J'ai fait une modif "à la mano".
Dans mail.inc.php, remplacer les lignes :
include_once("inc/phpm_ext.inc.php");
include_once("classes/phpmailer/class.pop3.php");
par :
if ((stristr($_SERVER['PHP_SELF'],"/admin/")) OR (stristr($_SERVER['PHP_SELF'],"/age/")) OR (stristr($_SERVER['PHP_SELF'],"/cli/")) OR (stristr($_SERVER['PHP_SELF'],"/do/")) OR (stristr($_SERVER['PHP_SELF'],"/ope/")) OR (stristr($_SERVER['PHP_SELF'],"/st/")))
{
include_once("../inc/phpm_ext.inc.php");
include_once("../classes/phpmailer/class.pop3.php");
}
else
{
include_once("inc/phpm_ext.inc.php");
include_once("classes/phpmailer/class.pop3.php");
}
Ca devrait mieux aller, maintenant.
On s'en occupe début de semaine et je poste un patch.
Bonne soirée.
Edit - modif 30/11/08 :
J'ai fait une modif "à la mano".
Dans mail.inc.php, remplacer les lignes :
include_once("inc/phpm_ext.inc.php");
include_once("classes/phpmailer/class.pop3.php");
par :
if ((stristr($_SERVER['PHP_SELF'],"/admin/")) OR (stristr($_SERVER['PHP_SELF'],"/age/")) OR (stristr($_SERVER['PHP_SELF'],"/cli/")) OR (stristr($_SERVER['PHP_SELF'],"/do/")) OR (stristr($_SERVER['PHP_SELF'],"/ope/")) OR (stristr($_SERVER['PHP_SELF'],"/st/")))
{
include_once("../inc/phpm_ext.inc.php");
include_once("../classes/phpmailer/class.pop3.php");
}
else
{
include_once("inc/phpm_ext.inc.php");
include_once("classes/phpmailer/class.pop3.php");
}
Ca devrait mieux aller, maintenant.
Modifié en dernier par Galawa le dim. nov. 30, 2008 6:52 pm, modifié 2 fois.
Gestionnaire du projet SMI
Depuis que j'ai fait cett modif, effectivement le renouvellement du mot passe fontionne par contre dès lors que SMI essaye d'envoyer un mail (lors d'une saisie d'intervention ou de création de client par ex) j'ai désormais cet erreur :
Warning: include_once(inc/phpm_ext.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/97eb275a9d5d9542d7cc2be4c9c931d1/web/smi/inc/mail.inc.php on line 42
Warning: include_once() [function.include]: Failed opening 'inc/phpm_ext.inc.php' for inclusion (include_path='.:/opt/php/lib/php') in /web/smi/inc/mail.inc.php on line 42
Warning: include_once(classes/phpmailer/class.pop3.php) [function.include-once]: failed to open stream: No such file or directory in /web/smi/inc/mail.inc.php on line 43
Warning: include_once() [function.include]: Failed opening 'classes/phpmailer/class.pop3.php' for inclusion (include_path='.:/opt/php/lib/php') in /web/smi/inc/mail.inc.php on line 43
Fatal error: Class 'SMIMailer' not found in /web/smi/inc/mail.inc.php on line 575
Warning: include_once(inc/phpm_ext.inc.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/97eb275a9d5d9542d7cc2be4c9c931d1/web/smi/inc/mail.inc.php on line 42
Warning: include_once() [function.include]: Failed opening 'inc/phpm_ext.inc.php' for inclusion (include_path='.:/opt/php/lib/php') in /web/smi/inc/mail.inc.php on line 42
Warning: include_once(classes/phpmailer/class.pop3.php) [function.include-once]: failed to open stream: No such file or directory in /web/smi/inc/mail.inc.php on line 43
Warning: include_once() [function.include]: Failed opening 'classes/phpmailer/class.pop3.php' for inclusion (include_path='.:/opt/php/lib/php') in /web/smi/inc/mail.inc.php on line 43
Fatal error: Class 'SMIMailer' not found in /web/smi/inc/mail.inc.php on line 575