Welcome Guest ( Connexion | M’enregistrer )



Heures au format UTC + 1 heure



Poster un nouveau sujet Répondre au sujet  [ 5 messages ] 
Auteur Message
 Sujet du message: [EN] Problems with zKup 2.06 and php 5.3.x
MessagePosté: Lun 26 Avr 2010 14:35 

Inscription: Lun 26 Avr 2010 14:24
Messages: 3

Hors ligne
Hello.
Since the upgrade to PHP 5.3.2 and the deprecated functions of 5.2.x zkup fails to work properly due to the use of eregi, ereg_replace and some other functions. Some of the ereg and eregi are easy to port to preg_match and preg_replace but i'm having big issues with the eregi used in the function completerChemin from includes/fct_xml.php . I've tryed to port it to preg_match but with no luck... please help :P

Code:
   function completerChemin($fichier,$extension='')
   {
      if (eregi("^".addslashes(CHEMIN)."(.*)$",$fichier) ) return $fichier;
      return CHEMIN.'/'.$fichier.$extension;
   }


p.s.
The outcome of the eregi deprecation is that the script generates the page and breaks just before the page heading <h1></h1>....


 Profil  
 
 Sujet du message: Re: [EN] Problems with zKup 2.06 and php 5.3.x
MessagePosté: Lun 26 Avr 2010 18:41 
Administrateur du site
Avatar de l’utilisateur

Inscription: Lun 28 Avr 2008 17:40
Messages: 312

Hors ligne
Hi,

did you tried to add this on your config.php ?

error_reporting(E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED);


For your problem, I didn't test it, but that should work properly.


Code:
  function completerChemin($fichier,$extension='')
   {
      if (preg_match("/^".addslashes(CHEMIN)."(.*)/i$",$fichier) ) return $fichier;
      return CHEMIN.'/'.$fichier.$extension;
   }


 Profil  
 
 Sujet du message: Re: [EN] Problems with zKup 2.06 and php 5.3.x
MessagePosté: Lun 26 Avr 2010 21:49 

Inscription: Lun 26 Avr 2010 14:24
Messages: 3

Hors ligne
well a config.php file is not supplied with zKup 2.06 (free version) and wouldn't a error_reporting setting just suppress the output and the error still exists, as in the script dies there...
as for the preg_match clue it has the same issue as my tryes ...
Warning: preg_match() [function.preg-match]: Unknown modifier 'r' in ./include/fct_xml.php on line 54

i've tried to add
if (preg_match("/addslashes(CHEMIN)/", $fichier)) return $fichier;
if (preg_match("/^".addslashes(CHEMIN)."(.*)/$",$fichier) ) return $fichier;
if (preg_match("/^".addslashes(CHEMIN)."(.*)$/",$fichier) ) return $fichier;

i do have the eregi library loaded to php
ereg - Regex Library - Bundled library enabled
so that wouldn't be the case... any clues?


 Profil  
 
 Sujet du message: Re: [EN] Problems with zKup 2.06 and php 5.3.x
MessagePosté: Mar 27 Avr 2010 08:55 
Administrateur du site
Avatar de l’utilisateur

Inscription: Lun 28 Avr 2008 17:40
Messages: 312

Hors ligne
Hi,

The clue is that the regex isn't correct.

Could you please do an "echo addslashes(CHEMIN);" to output the content of the variable ?

Thanks :)


 Profil  
 
 Sujet du message: Re: [EN] Problems with zKup 2.06 and php 5.3.x
MessagePosté: Mar 27 Avr 2010 11:42 

Inscription: Lun 26 Avr 2010 14:24
Messages: 3

Hors ligne
http://www.pvp.ro/cup/

the addslashes(CHEMIN) is:
/usr/home/wwww/pvpwww/cup

http://pvp.ro/cup/?page=echipe

i could work with a hard fix... like manually provide the right variable that zkup needs, with
Code:
return "/usr/home/wwww/pvpwww/cup/fichiers/selection.xml";

and comment the if statement but it does not work :|


 Profil  
 
Afficher les messages postés depuis:  Trier par  
Poster un nouveau sujet Répondre au sujet  [ 5 messages ] 

Heures au format UTC + 1 heure


Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 1 invité


Vous ne pouvez pas poster de nouveaux sujets
Vous ne pouvez pas répondre aux sujets
Vous ne pouvez pas éditer vos messages
Vous ne pouvez pas supprimer vos messages
Vous ne pouvez pas joindre des fichiers

Rechercher:
Aller à:  
cron