osCommerce France : Accueil Forum Portail osCommerce France Réponses aux questions Foire aux contributions

Bienvenue invité ( Connexion | Inscription )

 
Reply to this topicStart new topic
> Problème mise à jour php 5.3, Probleme après le checkout_success
Zelstiou
posté 23 Mar 2012, 12:50
Message #1


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 10
Inscrit : 16-March 12
Membre no 30734



Bonjour !

Mon serveur est passé au php 5.3 ce qui m'a valu des centaines de lignes de codes à changer.
Tout marche sauf à la toute fin et je bloque un peu...

sur la page /boutique/catalog/checkout_success.php, quand la commande est terminée et que l'on clique sur le bouton "suite", je tombe sur ce message d'erreur :


Warning: strlen() expects parameter 1 to be string, array given in /mnt/web9/32/64/51986464/htdocs/www/boutique/catalog/includes/functions/general.php on line 163

Warning: Cannot modify header information - headers already sent by (output started at /mnt/web9/32/64/51986464/htdocs/www/boutique/catalog/includes/functions/general.php:163) in /mnt/web9/32/64/51986464/htdocs/www/boutique/catalog/includes/functions/general.php on line 33


Voici ce que j'ai à ma ligne 163 :
if ( (strlen($value) > 0) && ($key != tep_session_name()) && ($key != 'error') && (!in_array($key, $exclude_array)) && ($key != 'x') && ($key != 'y') ) {

Voici ce que j'ai à ma ligne 33 :
header('Location: ' . $url);

Est-ce que quelqu'un peu m'aider svp ?
Go to the top of the page
 
Gnidhal
posté 23 Mar 2012, 14:43
Message #2


5eme dan OSC
Icône de groupe

Groupe : Administrateur
Messages : 9221
Inscrit : 4-March 03
Lieu : Pau
Membre no 927



l'erreur 2 est une conséquence de l'erreur 1, oublies-la
l'erreur 1 pourrait être du à la version de includes/functions/compatibility.php vérifie par rapport à cette version :
CODE
<?php
/*
$Id: compatibility.php,v 1.19 2003/04/09 16:12:54 project3000 Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2007 osCommerce

Released under the GNU General Public License



*/

////
// Recursively handle magic_quotes_gpc turned off.
// This is due to the possibility of have an array in
// $HTTP_xxx_VARS
// Ie, products attributes
function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;

reset($ar);
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

if (PHP_VERSION >= 4.1) {
$HTTP_GET_VARS =& $_GET;
$HTTP_POST_VARS =& $_POST;
$HTTP_COOKIE_VARS =& $_COOKIE;
$HTTP_SESSION_VARS =& $_SESSION;
$HTTP_POST_FILES =& $_FILES;
$HTTP_SERVER_VARS =& $_SERVER;
} else {
if (!is_array($HTTP_GET_VARS)) $HTTP_GET_VARS = array();
if (!is_array($HTTP_POST_VARS)) $HTTP_POST_VARS = array();
if (!is_array($HTTP_COOKIE_VARS)) $HTTP_COOKIE_VARS = array();
}

// handle magic_quotes_gpc turned off.
if (!get_magic_quotes_gpc()) {
do_magic_quotes_gpc($HTTP_GET_VARS);
do_magic_quotes_gpc($HTTP_POST_VARS);
do_magic_quotes_gpc($HTTP_COOKIE_VARS);
}

if (!function_exists('array_splice')) {
function array_splice(&$array, $maximum) {
if (sizeof($array) >= $maximum) {
for ($i=0; $i<$maximum; $i++) {
$new_array[$i] = $array[$i];
}
$array = $new_array;
}
}
}

if (!function_exists('in_array')) {
function in_array($lookup_value, $lookup_array) {
reset($lookup_array);
while (list($key, $value) = each($lookup_array)) {
if ($value == $lookup_value) return true;
}

return false;
}
}

if (!function_exists('array_reverse')) {
function array_reverse($array) {
for ($i=0, $n=sizeof($array); $i<$n; $i++) $array_reversed[$i] = $array[($n-$i-1)];

return $array_reversed;
}
}

if (!function_exists('constant')) {
function constant($constant) {
eval("\$temp=$constant;");

return $temp;
}
}

if (!function_exists('is_null')) {
function is_null($value) {
if (is_array($value)) {
if (sizeof($value) > 0) {
return false;
} else {
return true;
}
} else {
if (($value != '') && ($value != 'NULL') && (strlen(trim($value)) > 0)) {
return false;
} else {
return true;
}
}
}
}

if (!function_exists('array_merge')) {
function array_merge($array1, $array2, $array3 = '') {
if (empty($array3) && !is_array($array3)) $array3 = array();
while (list($key, $val) = each($array1)) $array_merged[$key] = $val;
while (list($key, $val) = each($array2)) $array_merged[$key] = $val;
if (sizeof($array3) > 0) while (list($key, $val) = each($array3)) $array_merged[$key] = $val;

return (array) $array_merged;
}
}

if (!function_exists('is_numeric')) {
function is_numeric($param) {
return preg_match('/^[0-9]{1,50}.?[0-9]{0,50}$/', $param);
}
}

if (!function_exists('array_slice')) {
function array_slice($array, $offset, $length = 0) {
if ($offset < 0 ) {
$offset = sizeof($array) + $offset;
}
$length = ((!$length) ? sizeof($array) : (($length < 0) ? sizeof($array) - $length : $length + $offset));
for ($i = $offset; $i<$length; $i++) {
$tmp[] = $array[$i];
}

return $tmp;
}
}

if (!function_exists('array_map')) {
function array_map($callback, $array) {
if (is_array($array)) {
$_new_array = array();
reset($array);
while (list($key, $value) = each($array)) {
$_new_array[$key] = array_map($callback, $array[$key]);
}
return $_new_array;
} else {
return $callback($array);
}
}
}

if (!function_exists('str_repeat')) {
function str_repeat($string, $number) {
$repeat = '';

for ($i=0; $i<$number; $i++) {
$repeat .= $string;
}

return $repeat;
}
}

if (!function_exists('checkdnsrr')) {
function checkdnsrr($host, $type) {
if(tep_not_null($host) && tep_not_null($type)) {
@exec("nslookup -type=$type $host", $output);
while(list($k, $line) = each($output)) {
if(preg_match("/^$host/i", $line)) {
return true;
}
}
}
return false;
}
}
?>

enfin vérifie que dans application_top.php les lignes
Code
// some code to solve compatibility issues
  require(DIR_WS_FUNCTIONS . 'compatibility.php');
sont bien placées juste après les lignes contenant
// define the project version
define('PROJECT_VERSION', '.....



--------------------
Tout d'abord : - Ni Hotline ni Service Après Vente, ces forums sont un lieu d'échange. BIEN POSER SA QUESTION (généralités)
Les "Informations Importantes" que vous devez ABSOLUMENT avoir lues :
Règlement, Bien poser sa question dans ces forums et Bien utiliser les Forums.
Les raccourcis pour gagner du temps : la FAQ, les PDF de la Doc (MS2-fr): PDF-V1 et PDF-V2, le moteur de Recherche sur les forums , la Liste des Contributions de Corbin.

----------------------------- Quelques sites de référence ---------------------------
PHP: Le site du Zéro et PHP Débutant avec la DOC en français -- HTML: Self HTML - WebProgrammation -- CSS: OpenWeb - AlsaCréations - CSS/Edge -- Autres ressources: - XajaX - highslide js
Les bons outils : EasyPHP - WAMP-5 - - Notepad++ - Firefox et son extension WebDeveloper
Le gène idéal c'est le gène original. Le génie des halles est un Génie des Alpages qui tente d'être à la page. (Merci f'murrr pour les cours de philosophie de chien)
Go to the top of the page
 
Zelstiou
posté 23 Mar 2012, 17:41
Message #3


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 10
Inscrit : 16-March 12
Membre no 30734



J'ai essayé mais ça bloque toute la boutique avec une autre alerte...

Ce message a été modifié par Zelstiou - 23 Mar 2012, 17:42.
Go to the top of the page
 
Zelstiou
posté 23 Mar 2012, 17:48
Message #4


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 10
Inscrit : 16-March 12
Membre no 30734



Y'a une proposition ici : http://forums.oscommerce.com/topic/362206-...hp-on-line-163/

Ca a marché... !

Ce message a été modifié par Zelstiou - 23 Mar 2012, 17:50.
Go to the top of the page
 
Zelstiou
posté 23 Mar 2012, 18:44
Message #5


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 10
Inscrit : 16-March 12
Membre no 30734



Mais par contre le module Paypal ipn laisse toutes le commandes sur le statut Preparing [PayPal IPN], alors qu'avant il les passait automatiquement à PayPal IPN Verified [payment status: Completed...

Une idée ?
Go to the top of the page
 
Zelstiou
posté 28 Mar 2012, 15:30
Message #6


Ceinture blanche OSC
Icône de groupe

Groupe : Membres
Messages : 10
Inscrit : 16-March 12
Membre no 30734



La réponse est ici : http://www.oscommerce-fr.info/forum/index....showtopic=66489
Go to the top of the page
 

Reply to this topicStart new topic
1 utilisateur(s) sur ce sujet (1 invité(s) et 0 utilisateur(s) anonyme(s))
0 membre(s) :

 



RSS Version bas débit Nous sommes le : 29th March 2024 - 07:57
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)