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

Bienvenue invité ( Connexion | Inscription )

4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic
> Deprecated: mysql_connect():
Rusti
posté 14 Mar 2018, 16:26
Message #26


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Bon c'est pas un fichier d'origine il doit être appeler dans le split_page_result ou peut être dans application_top
Sinon les ligne que je demandais c'étais celle du product_reviews_info

Ce message a été modifié par Rusti - 14 Mar 2018, 16:27.


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 16:40
Message #27


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



product reviews info :


ligne 184

CODE
<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($review['customers_firstname'] . ' ' . substr($review['customers_lastname'], 0, 1) . '.')) . '</b>'; ?></td>



ligne 185

CODE
<td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($review['date_added'])); ?></td>


ligne 206


CODE
<td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($review['reviews_text'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])) . '</i>'; ?></td>



ligbne 263

CODE
<?php

if (tep_not_null($review['products_image'])) {

?>




--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 16:50
Message #28


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



bon le top déjà j'ai réglé le problème de language c'était dans application top j'ai trouvé ce lien que j'avais vu y a un moment et que je n'avais pas fais et ça m'a réglé le problème de language et peut être même de session je vasi tester les sessions la


CODE
http://www.oscommerce-fr.info/forum/index.php?showtopic=45465



tip top panier réglé reste les strings now

tous le processe de commande fonctionne.....



Ce message a été modifié par taiko - 14 Mar 2018, 16:54.


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 17:21
Message #29


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Bon alors le message dis en gros qu'il reçois une chaine de caractères, alors qu'il ne devrait pas. Pourtant tes lignes me paraisse correcte donc le soucis doit se situé un peu plus haut dans ton fichier.
Regarde dans ton fichier Database.php si tu as bien mis un mysqli_fetch_array dans la fonction tep_db_fetch_array()

Ce message a été modifié par Rusti - 14 Mar 2018, 17:23.


--------------------
osCommerce v2.3
Go to the top of the page
 
Bonbec
posté 14 Mar 2018, 17:34
Message #30


Ceinture marron OSC
Icône de groupe

Groupe : Modérateurs
Messages : 1543
Inscrit : 30-May 06
Lieu : Vichy (03)
Membre no 10583



L'erreur Illegal string offset, c'est souvent quand on utilise une variable comme un array alors que ce n'est pas un array.
Je viens de regarder dans mon fichier et ce n'est pas $review['customers_firstname'] mais $reviews['customers_firstname'] (il manque un s à $review).
C'est le même type d'erreur aux lignes que tu as cité.

Vérifie quelques lignes au dessus dans ce fichier si tu as bien :
Code
    $reviews_query = tep_db_query($reviews_split->sql_query);
    while ($reviews = tep_db_fetch_array($reviews_query)) {


Éventuellement pour éviter de toucher à toutes les erreurs, remplace $reviews par $review pour voir ce que çà donne comme cela :
Code
    $reviews_query = tep_db_query($reviews_split->sql_query);
    while ($review = tep_db_fetch_array($reviews_query)) {



--------------------
Config 1 en live : Osc 2.2 très fortement modifié ... UTF-8 et Php 5.4.
Contribs installées : down_for_maintenance_v 2.3 | Estimated Shipping v1.5 | imprint_1_3_5 | low_stock_report_v2.04 | visible_countries_1.2b | Products Tabs | shoppingCart_cleanup_v1.01.0 | + trop de bidouilles persos pas très OsCommerce (erreurs de jeunesse)
Config 2 en local avec UwAmp : Osc Phoenix
Go to the top of the page
 
taiko
posté 14 Mar 2018, 17:46
Message #31


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

je regarde ok a tte


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 17:49
Message #32


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



bon dans le database j'ai bien ça car c'est celui de la version 2.3

CODE
function tep_db_fetch_array($db_query) {
return mysqli_fetch_array($db_query, MYSQLI_ASSOC);
}


pour le product reviews je regarde et modifie, j'ai aussi la même chose que le reviews dans le create account, quand je m'enregistre.



--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 17:58
Message #33


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



bon alors j'ai plus l'erreur mais j'ai pas le texte de l'avis client ni la photo du produit, je vasi mettre mon fichier car je sais pas si j'ai pas modifié d'autre review pour comparer au vôtre.

CODE
<?php

/*

$Id: product_reviews_info.php,v 1.50 2003/06/20 14:25:58 hpdl Exp $



osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com



Copyright © 2003 osCommerce



Released under the GNU General Public License

*/



require('includes/application_top.php');



if (isset($HTTP_GET_VARS['reviews_id']) && tep_not_null($HTTP_GET_VARS['reviews_id']) && isset($HTTP_GET_VARS['products_id']) && tep_not_null($HTTP_GET_VARS['products_id'])) {

$review_check_query = tep_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "'");

$review_check = tep_db_fetch_array($review_check_query);



if ($review_check['total'] < 1) {

tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))));

}

} else {

tep_redirect(tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))));

}



tep_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "'");



// $review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");

$review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name, c.customers_firstname, c.customers_lastname from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CUSTOMERS . " c where c.customers_id = r.customers_id and r.reviews_id = '" . (int)$HTTP_GET_VARS['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");

$review = tep_db_fetch_array($review_query);



if ($new_price = tep_get_products_special_price($review['products_id'])) {

$products_price = '<s>' . $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($review['products_tax_class_id'])) . '</span>';

} else {

$products_price = $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id']));

}



if (tep_not_null($review['products_model'])) {

$products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';

} else {

$products_name = $review['products_name'];

}



require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_REVIEWS_INFO);



$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<h1><title><?php echo TITLE; ?></title></h1>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
<script language="javascript">
function arriere_plan()
{
document.body.style.backgroundImage="url(images/back800.jpg)";
if (screen.width == 800) document.body.style.backgroundImage="url(images/back800.jpg) ";
else if (screen.width == 1024) document.body.style.backgroundImage="url(images/back1024.jpg)";
else if (screen.width == 1152) document.body.style.backgroundImage="url(images/back1152.jpg)";
else if (screen.width == 1280) document.body.style.backgroundImage="url(images/back1280.jpg)";
if (screen.width == 1440) document.body.style.backgroundImage="url(images/back1440.jpg)";
}
</script></head>
<body onLoad="arriere_plan()">
<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->



<!-- body //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<h1><td class="pageHeading" valign="top"><?php echo $products_name; ?></td></h1>

<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<!---<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</b>'; ?></td>--->

<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_firstname'] . ' ' . substr($reviews['customers_lastname'], 0, 1) . '.')) . '</b>'; ?></td>

<td class="smallText" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews['date_added'])); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td valign="top" class="main"><?php echo tep_break_string(nl2br(tep_output_string_protected($reviews['reviews_text'])), 60, '-<br>') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])) . '</i>'; ?></td>

<td width="10" align="right"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params(array('reviews_id'))) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="right" valign="top"><table border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="center" class="smallText">

<?php

if (tep_not_null($reviews['products_image'])) {

?>

<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $reviews['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $reviews['products_image'], addslashes($reviews['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $reviews['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $reviews['products_image'], $reviews['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

<?php

}



echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>';

?>

</td>

</tr>

</table>

</td>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->



<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>




--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 18:23
Message #34


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Re
Ce n'est pas le s pour review il a été indiquer sans s donc tu peux les enlever.
Va voir dans ton fichiers database comme je te le disais dans mon précédent post.
Sinon fait un petit test tout simple sur la ligne
Code
<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_firstname'] . ' ' . substr($reviews['customers_lastname'], 0, 1) . '.')) . '</b>'; ?></td>

remplace par
Code
<td class="main"><?php echo '<b>' . sprintf(TEXT_REVIEW_BY, 'Taiko') . '</b>'; ?></td>


et dit nous si tu as une erreur pour cette ligne


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 18:36
Message #35


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

bon pour les s que j'ai rajouter je peux les enlever alors je remet comme c'était.

j'ai remplacer la ligne et j'ai bien le texte " par taiko qui apparait



--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 18:48
Message #36


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Donc si tu n'a plus d'erreur à la ligne qui affiche par taiko.
En premier vas voir ton fichiers database.php si tu as bien mis un mysqli_fetch_array dans la fonction tep_db_fetch_array()

Sinon tu peux faire un autre petit test en ajoutant un (string) devant le $reviews['customers_firstname'] et $reviews['customers_lastname']


--------------------
osCommerce v2.3
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 18:50
Message #37


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Quand tu dit que tus a le texte " par taiko qui apparait
le " c'est une faute de frappe dans ton post ou il apparait vraiment sur ton site ?


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 19:00
Message #38


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



RE

oui ça apparaît vraiment , par contre j'ai testé de créer un nouvel avis et je reçois le mail de validation et je reçois ça.

le répertoire admin n'est pas bon c'est celui d'un autre de mes anciens sites c'est ou que je corrige ça ce qu'il y a dans l'email j'ai pas trouvé.

CODE
There is a new product review awaiting approval from your online store, please click the link below to view this review:
http://www.cuisine-design-deluxe.fr/exoticspafr/reviews.php


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 19:05
Message #39


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



alors

j'ai bien les lignes que tu parles par contre il manquait je pense un mysqli ici dites moi si je me trompe :

CODE
function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysql_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysql_connect($server, $username, $password);
}



j'ai remplaçé par ça déjà

CODE
function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysql_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysqli_connect($server, $username, $password);
}



euh en faite ils sont tous comme ça y a des mysql partout donc ça doît être normal non :


CODE
if ( !function_exists('mysqli_connect') ) {
define('MYSQLI_ASSOC', MYSQL_ASSOC);

function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysql_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysql_connect($server, $username, $password);
}

if ( $link ) {
mysql_select_db($database, $link);
}

return $link;
}

function mysqli_connect_errno($link = null) {
if ( is_null($link) ) {
return mysql_errno();
}

return mysql_errno($link);
}

function mysqli_connect_error($link = null) {
if ( is_null($link) ) {
return mysql_error();
}

return mysql_error($link);
}

function mysqli_set_charset($link, $charset) {
if ( function_exists('mysql_set_charset') ) {
return mysql_set_charset($charset, $link);
}
}

function mysqli_close($link) {
return mysql_close($link);
}

function mysqli_query($link, $query) {
return mysql_query($query, $link);
}

function mysqli_errno($link = null) {
if ( is_null($link) ) {
return mysql_errno();
}

return mysql_errno($link);
}

function mysqli_error($link = null) {
if ( is_null($link) ) {
return mysql_error();
}

return mysql_error($link);
}

function mysqli_fetch_array($query, $type) {
return mysql_fetch_array($query, $type);
}

function mysqli_num_rows($query) {
return mysql_num_rows($query);
}

function mysqli_data_seek($query, $offset) {
return mysql_data_seek($query, $offset);
}

function mysqli_insert_id($link) {
return mysql_insert_id($link);
}

function mysqli_free_result($query) {
return mysql_free_result($query);
}

function mysqli_fetch_field($query) {
return mysql_fetch_field($query);
}

function mysqli_real_escape_string($link, $string) {
if ( function_exists('mysql_real_escape_string') ) {
return mysql_real_escape_string($string, $link);
} elseif ( function_exists('mysql_escape_string') ) {
return mysql_escape_string($string);
}

return addslashes($string);
}

function mysqli_affected_rows($link) {
return mysql_affected_rows($link);
}

function mysqli_get_server_info($link) {
return mysql_get_server_info($link);
}


Ce message a été modifié par taiko - 14 Mar 2018, 19:08.


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 19:24
Message #40


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Bas normalement non c'est pas normal wink.gif
En fait je te l'avais dit un peu plus haut, tous les mysql_ + quelque chose, doivent être modifier en mysqli_ + quelque chose
Maintenant dans le fichiers database l'important dans un premier temps c'est le nom de la fonction donc pour l'instant bien vérifier que le tep_db_fetch_array() ressemble à ca
Code
function tep_db_fetch_array($db_query) {
    return mysqli_fetch_array($db_query, MYSQLI_ASSOC);
}


Et deuxième petite chose si le " est afficher c'est qu'il doit y avoir quelque chose qui n'as pas été fermer je pense.
Pour le mail je peu pas te dire je dirais de mémoire peut être dans le product_reviews_write.php


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 19:30
Message #41


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



ok

donc je fais pareil pour tous je dois modifier comme ça c'est ça on passe de ça :


CODE
function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysql_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysql_connect($server, $username, $password);
}


a ça

CODE
function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysqli_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysqli_connect($server, $username, $password);
}


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 19:37
Message #42


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



C'est ça, sauf que pour l'exemple que tu note je pense qu'il vas y avoir un souci avec le
Code
$link = mysqli_connect($server, $username, $password);

puisque la fonction demande aussi le $database. Donc pour commencer laisse cette fonction tel quel.
Il faudrait que je réinstalle un OSC pour te dire exactement et que tu ne fasse pas d'erreur

Ce message a été modifié par Rusti - 14 Mar 2018, 19:39.


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 19:41
Message #43


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

faut remplacer comme ça non :

CODE
function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysqli_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysqli_connect($server, $username, $password, $database);
}


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 19:44
Message #44


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Bon je vient de regarder sous le site que j'ai sous OSC tu peux mettre comme ça
Code
function mysqli_connect($server, $username, $password, $database) {
      if ( substr($server, 0, 2) == 'p:' ) {
        $link = mysqli_pconnect(substr($server, 2), $username, $password);
      } else {
        $link = mysqli_connect($server, $username, $password);
      }


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 19:59
Message #45


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

bon j'ai modifié comme ça et ça ne change rien du tout en tout cas, par contre avant je passais une commande et j'avais l'adrese de livraison et tous fonctionnait normalement maintenant je n'ai plus rien dans mon compte les informations personnel ne sont plus affichées ( nom prenom date de naissance etc... et l'adresse non plus mai sje peux passser commande et la commande est validé et je recois les mails de commandes etc...


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
Rusti
posté 14 Mar 2018, 20:20
Message #46


Ceinture jaune+ OSC
Icône de groupe

Groupe : Membres
Messages : 103
Inscrit : 11-October 10
Lieu : Villemomble
Membre no 28103



Je regardais ton site et sur la fiche produit il y a une erreur mysql_num_rows qui s'affiche pour le fichier thumb_bar.php
Je pense que tu dois avoir des fichiers qui ont été ajoutés et qui interfèrent, car je n’ai pas le souvenir d'avoir ce genre d'erreur quand je suis passé sur php5.6 alors que mon site est fortement modifié
Le nom, prénom.... doit être le même soucis que l'affichage des avis essais de faire des var_dump() pour avoir un peu plus de renseignement sur le problème


--------------------
osCommerce v2.3
Go to the top of the page
 
taiko
posté 14 Mar 2018, 20:37
Message #47


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

c'est à dire faire des var dump j'y connais rien lol !!!

j'ai la même chose en admin : avec les paniers invendus

Warning: mysql_num_rows() expects parameter 1 to be resource, object given in /home/cuisinedn/www/cuisine-designdeluxe/stats_unsold_carts.php on line 174

Ce message a été modifié par taiko - 14 Mar 2018, 20:37.


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 20:41
Message #48


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



re

tu m'as encore cette erreur moi je la vois pas j'ai modifie en mysqli a la place de mysql par contre j'ai toujours l'erreur

Fatal error: Cannot redeclare unionSplit::$page_number in /home/cuisinedn/www/includes/classes/union_split_page_results.php on line 34


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 20:54
Message #49


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



RE

ET aussi donc en admin général.php

FICHIER GENERAL ADMIN

Deprecated: mysql_get_server_info(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/cuisinedn/www/cuisine-designdeluxe/includes/functions/general.php on line 807

Warning: mysql_get_server_info(): No such file or directory in /home/cuisinedn/www/cuisine-designdeluxe/includes/functions/general.php on line 807

Warning: mysql_get_server_info(): A link to the server could not be established in /home/cuisinedn/www/cuisine-designdeluxe/includes/functions/general.php on line 807

ligne 807 c'est ça :
CODE


'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysql_get_server_info() : ''),


SI REMPLACER PAR /
CODE


'db_version' => 'MySQL ' . (function_exists('mysql_get_server_info') ? mysqli_get_server_info() : ''),


J'OBTIENS CA


Warning: mysqli_get_server_info() expects exactly 1 parameter, 0 given in /home/cuisinedn/www/cuisine-designdeluxe/includes/functions/general.php on line 807

ET AUSSI CETTE ERREUR

Deprecated: Function split() is deprecated in /home/cuisinedn/www/cuisine-designdeluxe/easypopulate.php on line 1317

LIGNE 317 C'EST $namearr = split('\.',$file);

CODE

<?PHP
//<input type="text" name="localfile" size="50">
$the_array = Array();
if (is_readable(EP_TEMP_DIRECTORY)) {
$handle = opendir(EP_TEMP_DIRECTORY);
while (false!== ($file = readdir($handle))) {
if ($file!= "." && $file!= ".." &&!is_dir($file)) {
$namearr = split('\.',$file);
if ($namearr[count($namearr)-1] == ((EP_EXCEL_SAFE_OUTPUT==true)?'csv':'txt')) $the_array[] = $file;
}
}
closedir($handle);
}

$array_size = count($the_array);
if($array_size == 0){
echo (' <input type="text" name="localfile" size="50">' . "\n");
} else {
echo (' <select name="localfile" size="1">' . "\n");
foreach ($the_array as $list){
echo (' <option value="' . $list . '">' . $list . '</option>' . "\n");
}
echo (' </select>' . "\n");
}
?>


bon le split c'est réglé j'ai remplacé par explode, je m'améliore lol !!!!

Ce message a été modifié par taiko - 14 Mar 2018, 21:37.


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 
taiko
posté 14 Mar 2018, 21:33
Message #50


Ceinture marron OSC
Icône de groupe

Groupe : Membres
Messages : 1770
Inscrit : 20-April 07
Lieu : chez mickey
Membre no 16736



j'ai remplacé tous les mysqli du database du catalog par ça par contre je perds la session en faisant ça


CODE
<?php
/*
$Id$

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

Copyright © 2013 osCommerce

Released under the GNU General Public License
*/

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;

if (USE_PCONNECT == 'true') {
$server = 'p:' . $server;
}

$$link = mysqli_connect($server, $username, $password, $database);

if ( !mysqli_connect_errno() ) {
mysqli_set_charset($$link, 'utf8');
}

return $$link;
}

function tep_db_close($link = 'db_link') {
global $$link;

return mysqli_close($$link);
}

function tep_db_error($query, $errno, $error) {
if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
error_log('ERROR: [' . $errno . '] ' . $error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

die('<font color="#000000"><strong>' . $errno . ' - ' . $error . '<br /><br />' . $query . '<br /><br /><small><font color="#ff0000">[TEP STOP]</font></small><br /><br /></strong></font>');
}

function tep_db_query($query, $link = 'db_link') {
global $$link;

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
error_log('QUERY: ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
}

$result = mysqli_query($$link, $query) or tep_db_error($query, mysqli_errno($$link), mysqli_error($$link));

return $result;
}

function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
reset($data);
if ($action == 'insert') {
$query = 'insert into ' . $table . ' (';
while (list($columns, ) = each($data)) {
$query .= $columns . ', ';
}
$query = substr($query, 0, -2) . ') values (';
reset($data);
while (list(, $value) = each($data)) {
switch ((string)$value) {
case 'now()':
$query .= 'now(), ';
break;
case 'null':
$query .= 'null, ';
break;
default:
$query .= '\'' . tep_db_input($value) . '\', ';
break;
}
}
$query = substr($query, 0, -2) . ')';
} elseif ($action == 'update') {
$query = 'update ' . $table . ' set ';
while (list($columns, $value) = each($data)) {
switch ((string)$value) {
case 'now()':
$query .= $columns . ' = now(), ';
break;
case 'null':
$query .= $columns .= ' = null, ';
break;
default:
$query .= $columns . ' = \'' . tep_db_input($value) . '\', ';
break;
}
}
$query = substr($query, 0, -2) . ' where ' . $parameters;
}

return tep_db_query($query, $link);
}

function tep_db_fetch_array($db_query) {
return mysqli_fetch_array($db_query, MYSQLI_ASSOC);
}

function tep_db_num_rows($db_query) {
return mysqli_num_rows($db_query);
}

function tep_db_data_seek($db_query, $row_number) {
return mysqli_data_seek($db_query, $row_number);
}

function tep_db_insert_id($link = 'db_link') {
global $$link;

return mysqli_insert_id($$link);
}

function tep_db_free_result($db_query) {
return mysqli_free_result($db_query);
}

function tep_db_fetch_fields($db_query) {
return mysqli_fetch_field($db_query);
}

function tep_db_output($string) {
return htmlspecialchars($string);
}

function tep_db_input($string, $link = 'db_link') {
global $$link;

return mysqli_real_escape_string($$link, $string);
}

function tep_db_prepare_input($string) {
if (is_string($string)) {
return trim(tep_sanitize_string(stripslashes($string)));
} elseif (is_array($string)) {
reset($string);
while (list($key, $value) = each($string)) {
$string[$key] = tep_db_prepare_input($value);
}
return $string;
} else {
return $string;
}
}

function tep_db_affected_rows($link = 'db_link') {
global $$link;

return mysqli_affected_rows($$link);
}

function tep_db_get_server_info($link = 'db_link') {
global $$link;

return mysqli_get_server_info($$link);
}

if ( !function_exists('mysqli_connect') ) {
define('MYSQLI_ASSOC', MYSQL_ASSOC);

function mysqli_connect($server, $username, $password, $database) {
if ( substr($server, 0, 2) == 'p:' ) {
$link = mysqli_pconnect(substr($server, 2), $username, $password);
} else {
$link = mysqli_connect($server, $username, $password);
}

if ( $link ) {
mysql_select_db($database, $link);
}

return $link;
}

function mysqli_connect_errno($link = null) {
if ( is_null($link) ) {
return mysql_errno();
}

return mysql_errno($link);
}

function mysqli_connect_error($link = null) {
if ( is_null($link) ) {
return mysql_error();
}

return mysql_error($link);
}

function mysqli_set_charset($link, $charset) {
if ( function_exists('mysql_set_charset') ) {
return mysql_set_charset($charset, $link);
}
}

function mysqli_close($link) {
return mysql_close($link);
}

function mysqli_query($link, $query) {
return mysql_query($query, $link);
}

function mysqli_errno($link = null) {
if ( is_null($link) ) {
return mysql_errno();
}

return mysql_errno($link);
}

function mysqli_error($link = null) {
if ( is_null($link) ) {
return mysql_error();
}

return mysql_error($link);
}

function mysqli_fetch_array($query, $type) {
return mysql_fetch_array($query, $type);
}

function mysqli_num_rows($query) {
return mysql_num_rows($query);
}

function mysqli_data_seek($query, $offset) {
return mysql_data_seek($query, $offset);
}

function mysqli_insert_id($link) {
return mysql_insert_id($link);
}

function mysqli_free_result($query) {
return mysql_free_result($query);
}

function mysqli_fetch_field($query) {
return mysql_fetch_field($query);
}

function mysqli_real_escape_string($link, $string) {
if ( function_exists('mysql_real_escape_string') ) {
return mysql_real_escape_string($string, $link);
} elseif ( function_exists('mysql_escape_string') ) {
return mysql_escape_string($string);
}

return addslashes($string);
}

function mysqli_affected_rows($link) {
return mysql_affected_rows($link);
}

function mysqli_get_server_info($link) {
return mysql_get_server_info($link);
}
}
?>


Ce message a été modifié par taiko - 14 Mar 2018, 21:38.


--------------------
oscommerce ms2.2 delaballe, header tag controller v2-6-3, Agree2Terms_v1.6.7, MS2-2.2-SiteMap-SEO-URLs-withproducts (bientot), sponsorship v2.2,pack_newsletters, pack_newsletters, Prof_Invoice&PackingSlip_v0.2(fr+stylesheet) (je crois), checkout_confirmation_chg_valid_xhtml, + d'autres mais je sais plus trop a force.
Go to the top of the page
 

4 Pages V  < 1 2 3 4 >
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 : 28th March 2024 - 21:21
Ce site est déclaré auprès de la commision Nationale
de l'Informatique et des Libertés (déclaration n°: 1043896)