WordPress.org

Ready to get started?Download WordPress

Forums

PHP include help (9 posts)

  1. jakej78
    Member
    Posted 5 years ago #

    I've installed exec-php so that php includes work in pages and such, but I keep getting the following errors:

    Warning: Unknown(potter_sidebar.php): failed to open stream: No such file or directory in /home/xxx/public_html/staff/tommay/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

    Warning: Unknown(potter_sidebar.php): failed to open stream: No such file or directory in /home/xxx/public_html/staff/tommay/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

    Warning: Unknown(potter_sidebar.php): failed to open stream: No such file or directory in /home/xxx/public_html/staff/tommay/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

    Warning: (null)() [function.include]: Failed opening ‘potter_sidebar.php’ for inclusion (include_path=’/usr/lib/php:.:/usr/php4/lib/php:/usr/local/php4/lib/php:/home/xxx/php’) in /home/xxx/public_html/staff/tommay/wordpress/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 1

    Line 41-45 of runtime.php:

    ob_start();
    eval("?>$content<?php ");
    $output = ob_get_contents();
    ob_end_clean();
    return $output;

    And my php include is...
    <?php include("potter_sidebar.php"); ?>

    If anyone could help, it'd be great, thanks in advance.

  2. whooami
    Member
    Posted 5 years ago #

    potter_sidebar.php.

    where is that file located in relation to your blog. i would check how that plugin uses paths, and make sure that the path to that is correct

  3. iridiax
    Member
    Posted 5 years ago #

    Do not use relative links with WordPress. Either use full links or put your include files in your theme folder and try this instead:

    <?php include (TEMPLATEPATH . '/potter_sidebar.php'); ?>

  4. whooami
    Member
    Posted 5 years ago #

    yes, or something like this.

    <?php include(ABSPATH . '/scripts/potter_sidebar.php'); ?>

    --

    you beat me to it, iridiax, since I was reading the plugin's page :P

  5. jakej78
    Member
    Posted 5 years ago #

    Aha, got it to work. Thanks guys, much appreciated.

  6. galleryuccs
    Member
    Posted 5 years ago #

    Exec-php has really compromised our wordpress site.

    I'm getting errors on post pages, saying that if I save them the php will be rendered permanently unusable.

    Now the right post content can't be found for the pages, and neither can the images!

    Please help, I'm the new admin on the galleryuccs.org site.
    Any help would be greatly appreciated!
    Millie

  7. Amphor
    Member
    Posted 5 years ago #

    nvm anymore

  8. easydoor
    Member
    Posted 5 years ago #

    HI
    sorry for my english but I'm french

    I use this in my post " <?php include("http://flux.fan-de-cinema.com/cinemas/stars-arpajon.html");?> "
    exec php it's ok
    and my théme give to me that, what it's the problem
    best regards

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /homepages/40/d261825713/htdocs/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 5

    Warning: include(http://flux.fan-de-cinema.com/cinemas/stars-arpajon.html) [function.include]: failed to open stream: no suitable wrapper could be found in /homepages/40/d261825713/htdocs/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 5

    Warning: include() [function.include]: Failed opening ‘http://flux.fan-de-cinema.com/cinemas/stars-arpajon.html’ for inclusion (include_path=’.:/usr/lib/php5′) in /homepages/40/d261825713/htdocs/wp-content/plugins/exec-php/includes/runtime.php(42) : eval()’d code on line 5

  9. VizionQuest
    Member
    Posted 4 years ago #

    I am receiving this error:

    Fatal error: Call to a member function has_cap() on a non-object in /wp-content/plugins/exec-php/includes/user_ui.php on line 41

    More info here: http://wordpress.org/support/topic/246237

    Any help you could provide would be greatly appreciated, thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags