php acting weird in wordpress plugin

Discussion in 'PHP' started by bondigor69, Jun 26, 2012.

  1. #1
    hello people im using an free wordpress plugin called WP Greetbox.
    and in the area that I write my own greeting message I tried to execute some php
    <?php 
    $test = 'test';
    echo $test;
    ?>
    PHP:
    but it dosent work???
    when I check the source of the page after I see
    <!--?php 
    $test = 'test';
    echo $test;
    ?-->
    PHP:
    Can someone help please
     
    bondigor69, Jun 26, 2012 IP
  2. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #2
    The plugin is deactivating PHP code by commenting it out. In other words, the plugin isn't allowing you to use PHP code where it's asking for plain content.
     
    NetStar, Jun 26, 2012 IP
  3. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #3
    is there a way that I can enable it ???
     
    bondigor69, Jun 26, 2012 IP
  4. Blue Star Ent.

    Blue Star Ent. Well-Known Member

    Messages:
    1,989
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Is the plugin compatible with your version of WP?
     
    Blue Star Ent., Jun 26, 2012 IP
  5. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #5
    If not a setting you can edit the plugin. Search for where the code is looking for "<?" or "<?php" to replace it with "<!--" and just edit it out.
     
    NetStar, Jun 26, 2012 IP
  6. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #6
    there is 4 php files in this plugin
    There is no <!--

    Check the attchmnet
    I sent the 4 files

    and @Blue Star Ent. yes this plugin is compatible with my WP version
     

    Attached Files:

    • php.zip
      File size:
      15.3 KB
      Views:
      23
    bondigor69, Jun 27, 2012 IP
  7. NetStar

    NetStar Notable Member

    Messages:
    2,471
    Likes Received:
    541
    Best Answers:
    21
    Trophy Points:
    245
    #7
    I'm not going to go through the files. But I'm telling you if you are writing "<?php" from a text box and it's being converted in to "<!--php" obviously the script is converting the tag. It's either the script that displays the text or the script you submit the text to.
     
    NetStar, Jun 27, 2012 IP
  8. bondigor69

    bondigor69 Greenhorn

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #8
    yes I understand and still can't find it.
     
    bondigor69, Jun 27, 2012 IP