Tom's Guide > Forum > Programmation > Pb avec set_cookie suite migration1&1 a ovh

Pb avec set_cookie suite migration1&1 a ovh

Forum Programmation : Pb avec set_cookie suite migration1&1 a ovh

TomsGuide.com : 800 000 inscrits répondent à toutes vos questions high-tech et informatique. Pour obtenir de l'aide, inscrivez-vous gratuitement !
Mot :    Pseudo :           
 

Bonjour,

Suite à la migration de 1&1.com a 10gp (ovh)

J'ai le message d'erreur suivant, pouvez-vous m'aider

Merci d'avance!

Code :
  1. Fatal error: Call to undefined function: set_cookie() in /home.19/c/r/o/croacroa/www/members/kits/include.php on line 73




Biensur après recherche sur internet j'ai vérifié le

Code :
  1. session_start();

dans include.php

voici ci joint mon fichier include.php

Code :
  1. <?php
  2. session_start();
  3. include('../../../cfg.php');
  4. $db = mysql_connect($mysql_host,$mysql_user,$mysql_password) or die ("erreur de connexion" );
  5. mysql_select_db($mysql_base,$db) or die ("erreur de connexion base" );
  6. function middle()
  7. {
  8.     $r1=mysql_query("SELECT * FROM members WHERE id='$_SESSION[masterid]'" );
  9.     $c1=mysql_fetch_array($r1);
  10.     include('../get.array.php');
  11.     if(empty($_GET[p]))
  12.     {
  13.         if(empty($c1['index']) && file_exists('../../modules/news/ccnews.php'))
  14.         {
  15.             include('../../modules/news/ccnews.php');
  16.         }
  17.         elseif(isset($c1['index']) && file_exists('pages/'.$c1['index']))
  18.         {
  19.             include('../../modules/editor.html/php.fct/fgcode2html.fct.php');
  20.             $page = 'pages/'.$c1['index'];
  21.             $page_html = '';
  22.             $fo = fopen($page,'r+');
  23.             $page_html = fread($fo, filesize($page));
  24.             $page_html = stripslashes($page_html);
  25.             fclose($fo);
  26.             $img_path = 'img/gallery/img/';
  27.             $smileys_path = '../../img/smileys/';
  28.             fgcode2html($page_html , $img_path , $smileys_path , "1" );
  29.         }
  30.         else
  31.         {
  32.             echo'Bienvenue sur le site de '.$_SESSION[master];
  33.         }
  34.     }
  35.     elseif(file_exists('pages/'.$_GET[p].'.html') && empty($_GET[mod]))
  36.     {
  37.         include('../../modules/editor.html/php.fct/fgcode2html.fct.php');
  38.         $page = 'pages/'.$_GET['p'].'.html';
  39.         $page_html = '';
  40.         $fo = fopen($page,'r+');
  41.         $page_html = fread($fo, filesize($page));
  42.         $page_html = stripslashes($page_html);
  43.         fclose($fo);
  44.         $img_path = 'img/gallery/img/';
  45.         $smileys_path = '../../img/smileys/';
  46.         fgcode2html($page_html , $img_path , $smileys_path , "1" );
  47.     }
  48.     elseif(file_exists('../../'.$dir[$_GET[mod]].'/'.$_GET[p].'.php') && isset($_GET[mod]))
  49.     {
  50.         include('../../'.$dir[$_GET[mod]].'/'.$_GET[p].'.php');
  51.     }
  52.     elseif(eregi('http://', $_GET['p']))
  53.     {
  54.         echo '<META HTTP-EQUIV="refresh" CONTENT="0; URL='.$_GET['p'].'">';
  55.     }
  56.     else
  57.     {
  58.         echo'<center>Aucune page ne correspond à ce lien : '.$dir[$_GET[mod]].'/'.$_GET[p].'.php.</center>';
  59.     }
  60.     // stats
  61.     function stats()
  62.     {
  63.         $jour = date("d" );
  64.         $site='cc'.$_SESSION['master'];
  65.         if($_COOKIE[site] != $jour)
  66.         {
  67.             set_cookie($site, $jour, time()+24*3600, "/", '.croacroa.com');
  68.             $session = $_SESSION['master'];
  69.             $day = date("d/m/Y" );
  70.             $fo = fopen('http://croacroa.com/members/users/'.$session.'lastlog.stats','r+');
  71.             $lastlog_content = fgets($fo, 255);
  72.             if($day != $lastlog_content)
  73.             {  fseek($fo, 0);  fputs($fo, date("d/m/Y" ));  $daydiff = 'yes';  }
  74.             else
  75.             {  $daydiff = 'no';  }
  76.             fclose($fo);
  77.             $fo = fopen('http://croacroa.com/members/users/'.$session.'total.stats','r+');
  78.             $total = fgets($fo, 255);
  79.             $total++;
  80.             fseek($fo,0);
  81.             fputs($fo,$total);
  82.             fclose($fo);
  83.             if($daydiff == 'no')
  84.             {
  85.                 $fo = fopen('http://croacroa.com/members/users/'.$session.'visits.stats','r+');
  86.                 $visits = fgets($fo, 255);
  87.                 $visits++;
  88.                 fseek($fo,0);
  89.                 fputs($fo,$visits);
  90.                 fclose($fo);
  91.             }
  92.             elseif($daydiff == 'yes')
  93.             {
  94.                 $content_new = '';
  95.                 $a = '';
  96.                 $out = '';
  97.                 $fo = fopen('http://croacroa.com/members/users/'.$session.'visits.stats', 'r+');
  98.                 $content = fgets($fo, 255);
  99.                 $content = explode(",", $content);
  100.                 if(count($content) >= '30')
  101.                 {
  102.                     for($a=1; $a<count($content); $a++)
  103.                     {
  104.                         if($a == '1')
  105.                         {  $content_new .= $content[$a];  }
  106.                         elseif($a != '1')
  107.                         {  $content_new .= ','.$content[$a];  }
  108.                     }
  109.                     $out = '1';
  110.                 }
  111.                 fseek($fo,0);
  112.                 fputs($fo,$content_new);
  113.                 fclose($fo);
  114.                 // --
  115.                 $fo = fopen('http://croacroa.com/members/users/'.$session.'visits.stats','r+');
  116.                 $content = fgets($fo, 255);
  117.                 if($out == '1')
  118.                 {  $write = substr($content, 0, -3).',0001';  }
  119.                 else
  120.                 {  $write = $content.',0001';  }
  121.                 fseek($fo,0);
  122.                 fputs($fo,$write);
  123.                 fclose($fo);
  124.             }
  125.             setcookie($session, $jour, time() + 3600*24);
  126.         }
  127.     }
  128.     stats();
  129. }
  130. function menu($menu,$interactif)
  131. {
  132.     if($menu=='1')
  133.     {
  134.         include('menu.php');
  135.         foreach($menu_array as $key => $value)
  136.         {
  137.             lien($key,'?p='.$value);
  138.         }
  139.     }
  140.     if($interactif=='1')
  141.     {
  142.         $req=mysql_query("SELECT * from members where id='$_SESSION[masterid]'" ) or die("erreur selection members" );
  143.         $c=mysql_fetch_array($req);
  144.         if($c[gbook]=='yes')
  145.         {
  146.             $key="Livre d'or";
  147.             $value="?p=index&mod=gbook";
  148.             lien($key,$value);
  149.         }
  150.         if($c[forum]=='yes')
  151.         {
  152.             $key="Forum";
  153.             $value='?p=index&mod=forum';
  154.             lien($key,$value);
  155.         }
  156.         $key="Galerie images";
  157.         $value="?p=index&mod=gallery";
  158.         lien($key,$value);
  159.         $key="News";
  160.         $value="?p=ccnews&mod=news";
  161.         lien($key,$value);
  162.     }
  163. }
  164. function partner()
  165. {
  166.     $req=mysql_query("SELECT * from partner where masterid='$_SESSION[masterid]'" );
  167.     while($c=mysql_fetch_array($req))
  168.     {
  169.         partnerlink($c[nom], $c[url]);
  170.     }
  171. }
  172. ?>



Merci d'avance pour votre aide

Liens sponsorisés
Inscrivez-vous ou connectez-vous pour masquer ceci.
Tom's Guide > Forum > Programmation > Pb avec set_cookie suite migration1&1 a ovh
Aller à :

Il y a 1513 utilisateurs connus et inconnus. Pour voir la liste des connectés connus, cliquez ici.

Attention

Vous allez répondre sur un sujet resté inactif pendant plus de 6 mois.
Assurez-vous d'apporter des éléments nouveaux à la discussion avant de poursuivre.

Répondre Annuler
Liens