le_fermier
Messages postés63Date d'inscriptionmardi 1 avril 2008StatutMembreDernière intervention 9 février 2011
-
28 mai 2009 à 15:59
le_fermier
Messages postés63Date d'inscriptionmardi 1 avril 2008StatutMembreDernière intervention 9 février 2011
-
31 mai 2009 à 00:30
Bonjour,
Pouvez vous les amis me montrer comment installer une extension PHP sur un serveur hébergé ? a savoir "mcrypt_module"
J ai uploadé mon nouveau site sur le serveur mais quand j'essaie d'y accéder j'ai ce message :
Fatal error: Call to undefined function: mcrypt_module_open() in /home/httpd/vhosts/mon-site.com/httpdocs/dossier-sous-domaine/admin/includes/class_utils.php on line 233
=================
La ligne 233 dans class_utils.php il y'a ceci :
=================
Le contenu complet de class_utils.php est :
<?php
$PHP_SELF = $_SERVER['PHP_SELF'];
if (eregi("class_utils.php",$PHP_SELF)) {
Header("HTTP/1.0 404 Not Found");
die();
}
/**
*Class Database file
*Utils extends DB_Sql class.
**/
require_once(_DirINCLUDES."class_mysql.php");
/**
*Adds somes utilities like encryptation, image resize, save image to folder, delete folder, check date format, etc...
*@author Josep Marxuach
*@version 1.0
*@copyright 2004 by IT eLazos SL
*@package Site
*/
class utils extends DB_Sql {
/**
*Cryptar.
*Si 1 = todas los gets son encryptados, 0 = todos los gets son planos
*@var Integer
*/
var $cryptar = True ;
/**
*Random.
*Si 1 = encrypta con un numero final random rand(1,100) para que sean siempre diferentes, 0 = Se encripta sin Rand
*@var boolean
*/
var $Random = False;
var $iv64="cx0DjR012c0PACRAvpm01LojVUjvUL0cH9Yyp5/WMYc=";
var $ekey = "a7bc27daf59679de9db7b68b1ef92785";
/**
* Encryptar una url.
* Recoge todas variables de una URL y las encrypta. Devuelve una variable URL=texto emcriptado.
*@param string Vars de una URL para encriptar
**/
function url_encrypt($text){
//$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
//$iv=base64_decode($this->iv64);
$text="url".$text;
if ($this->Random) $text.="#".rand(1,100);else $text.="#00";
//$text=mcrypt_encrypt(MCRYPT_RIJNDAEL_256,"color",$text, MCRYPT_MODE_ECB,$iv);
if ($this->cryptar) $text=$this->ecrypt($text);
$text="url=".base64_encode($text);
return $text;
}
/**
* Desencryptar una url.
* Recoge la variable url de una URL y la desencrypta. Devuelve las variables en formato URL.
*@param string URL para desencriptar
**/
function txt_encrypt($text){
//$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
//$iv=base64_decode($this->iv64);
$text="url".$text;
if ($this->Random) $text.="#".rand(1,100);else $text.="#00";
//$text=mcrypt_encrypt(MCRYPT_RIJNDAEL_256,"color",$text, MCRYPT_MODE_ECB,$iv);
if ($this->cryptar) $text=$this->ecrypt($text);
$text=base64_encode($text);
return $text;
}
/**
*Desencryptar texto.
*@param string Texto a desencriptar.
**/
function decrypt_string($text){
//$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
//$iv=base64_decode($this->iv64);
//echo $text."<br/>";
$text=base64_decode($text);
//echo $text."<br/>";
//$text=mcrypt_decrypt(MCRYPT_RIJNDAEL_256,"color",$text, MCRYPT_MODE_ECB,$iv);
if ($this->cryptar) $text=$this->dcrypt($text);
return $text;
}
/**
*Encryptar texto.
*@param string Texto a encriptar.
**/
function url_decrypt($text){
$text=$this->decrypt_string($text);
if (substr($text, 0, 3)=="url") {
if ($imagen && !ereg("[^A-Za-z0-9._]", $imagen)) {
if (!$this->img_resize($origen.$imagen, $destino.$imagen, $max_pixels, false))
{unlink($origen.$imagen);return false;} else unlink($origen.$imagen); // borro el fichero de temporal
if (isset($imagen_old)
&& $imagen_old!=""
&& file_exists($destino.$imagen_old))
unlink($destino.$imagen_old);
return true; // borro el fichero de anterior
} else return false;
}
/**
* Cambia el formato de la fecha para que se pueda introducir en una base de datos SQL
* El formato SQL es YYYYMMDD
**/
function date_sql_format($date,$current_format){
if (!isset($date) || $date=="") return false;
if (strchr($date,"-")) $date=ereg_replace("-","/",$date);
if (strchr($date,".")) $date=ereg_replace("\.","/",$date);