• Resolved David LeBlanc

    (@davidtleblanc)


    I have to insert a leads form in a page. The form is custom template written to interface with the database of client service. I installed the template in the themes folder and installed the insert php plugin. I converted the php to short code and put this in the text tab:
    [insert_php] include ‘leads-coupon.php’; [/insert_php]

    I got this:

    Warning: include(leads-coupon.php): failed to open stream: No such file or directory in C:\xampp\htdocs\wordpress\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code on line 1

    Warning: include(): Failed opening ‘leads-coupon.php’ for inclusion (include_path=’.;C:\xampp\php\PEAR’) in C:\xampp\htdocs\wordpress\wp-content\plugins\insert-php\insert_php.php(48) : eval()’d code on line 1

    The people who wrote the custom template says it’s my problem. Any help would be appreciated.

    https://www.ads-software.com/plugins/insert-php/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter David LeBlanc

    (@davidtleblanc)

    I forgot to mention. I am using a Woo theme and I am using their shortcodes as well, I did notice a previous post that indicated there maybe a conflict with the Woo short codes. I am also using XAMPP. Could that be causing a problem?

    Plugin Author WillBontrager

    (@willbontrager)

    Hi davidtleblanc,

    Specify the path to the leads-coupon.php file. I.e.:

    [insert_php]
    include('C:/xampp/htdocs/directory/leads-coupon.php');
    [/insert_php]

    Without the path information, the plugin looks for leads-coupon.php in the directory where the plugin script resides. Specifying a path should let it find leads-coupon.php

    I’m unable to predict whether or not this plugin and Woo will have conflict. Give it a try and see. I would appreciate it if you let me know either way.

    Will

    Thread Starter David LeBlanc

    (@davidtleblanc)

    Will,

    Thank you for the reply. I think your suggestion solved half the problem. Just not the complete solution.

    I added the following:[insert_php](‘C:/xampp/htdocs/wordpress/wp-content/themes/canvas/leads-coupon.php’);[/insert_php]

    The warnings disappeared, but now there is nothing. I think that means it’s connecting to the leads-coupon.php file, but not pulling in the form. So your plugin is working.

    In the HTML section of the php file, I put this: <?php include (‘leads-coupon.php’); ?>. As I understand it, this is the bit of code that allows the form to be pulled in.

    Again thanks for your reply and any other advice you can offer would be appreciated. Sorry I know diddly about PHP and I have to make this work.

    Makes me want to recommend whatever it is you sell to my boss.

    Plugin Author WillBontrager

    (@willbontrager)

    davidtleblanc, call “include” with the request:

    [insert_php]
    include('C:/xampp/htdocs/wordpress/wp-content/themes/canvas/leads-coupon.php');
    [/insert_php]

    That should do it.

    To verify it actually included, something like this might temporarily be inserted into leads-coupon.php

    echo 'TESTING';

    Will

    Thread Starter David LeBlanc

    (@davidtleblanc)

    Thanks, Will, that did the trick. Now I think there are problems with the leads-coupon.php file. At least the page is seeing the file, I have that much working for me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conflict with form’ is closed to new replies.