• Resolved allodigi

    (@allodigi)


    bonjour à tous

    je rencontre une erreur sur le thème impossible de faire quoi que ce soit sur la page mon compte du site au moment de valider un code via mediapay en utilisant le PHP Code Snippets des que le code est valide cela crédite bien le compte sans soucis voila ce que je re?ois en erreur voici le message pouvez-vous m’aider a comprendre merci a tous

    Warning: Cannot modify header information – headers already sent by (output started at /homepages/30/d834789026/htdocs/app834789062/wp-content/themes/attire/header.php:5) in /homepages/30/d834789026/htdocs/app834789062/wp-content/plugins/insert-php-code-snippet/widget.php(64) : eval()’d code on line 23

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Shafaet Alam

    (@shafayat-alam)

    Hi,
    From what I understood from your message (using an online translator) and the error message, the issue seems to be the PHP code that is inserted using the plugin. Can I see the code you’re inserting using insert-php-code-snippet? That’ll help me understand the problem better.
    Thanks

    Thread Starter allodigi

    (@allodigi)

    <?php
    			if(isset($_GET['identifiant'])&&isset($_GET['auth'])&&isset($_GET['code']))
    			{
    					if ($_GET['identifiant'] === "0917a03639") 
    						{
    						do_shortcode('[mycred_give amount=200 log=" Le code '.$_GET["code"].' a été ajouter a votre Compte " ref="MediaPay"]');
    						}
    						else if ($_GET['identifiant'] === "c8a2c19539")
    						{ 
    							do_shortcode('[mycred_give amount=100 log=" Le code '.$_GET["code"].' a été ajoutés a votre Compte " ref="MediaPay"]');
    						}
                                                    else if ($_GET['identifiant'] === "0c73164224")
    						{ 
    							do_shortcode('[mycred_give amount=200 log=" Le code '.$_GET["code"].' a été ajoutés a votre Compte " ref="MediaPay"]');
    						}
                                                     else if ($_GET['identifiant'] === "717c313639")
    						{ 
    							do_shortcode('[mycred_give amount=200 log=" Le code '.$_GET["code"].' a été ajoutés a votre Compte " ref="MediaPay"]');
    						}
                                     
    				$user = wp_get_current_user();
    				$f = fopen("fichier.csv", "a");
    				fwrite($f, $_SERVER['HTTP_HOST'].strtok($_SERVER["REQUEST_URI"], '?').";".$_GET['identifiant'].";".$_GET['auth'].";".$_GET['code'].";".$user->ID.";".date("Y-m-d H:i:s")."\n");
    				fclose($f);
    
    				header("Location: www.lotipass.fr/mon-compte");
    			}
    //else{header("Location: https://lotipass.fr/paiement-non-valide");}
    ?>
    Thread Starter allodigi

    (@allodigi)

    normalement lors de la validation du code il devrait pas avoir ce message que je vous montre https://allodigi.com/code-valide?identifiant=7825827922&auth=18f102109a56279406887f9abf2d70ed&code=

    Theme Author Shafaet Alam

    (@shafayat-alam)

    I seem not to be able to reproduce this issue. I installed the plugin insert-php-code-snippet and added the code you provided above to a post. It seems to be working without problem. But it’s most likely to be caused by this line of code header("Location: www.lotipass.fr/mon-compte");. Use wp redirect or javascript redirection method to avoid the issue
    Thanks

    • This reply was modified 3 years, 8 months ago by Shafaet Alam.
    Thread Starter allodigi

    (@allodigi)

    merci pouvez crée un compte sur https://www.allodigi.com est je vous mais en administrateur

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘erreur sur theme’ is closed to new replies.