Title: PHP include help
Last modified: August 19, 2016

---

# PHP include help

 *  [jakej78](https://wordpress.org/support/users/jakej78/)
 * (@jakej78)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/php-include-help-1/)
 * 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.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879218)
 * 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
 *  [iridiax](https://wordpress.org/support/users/iridiax/)
 * (@iridiax)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879219)
 * 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'); ?>`
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879220)
 * 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 😛
 *  Thread Starter [jakej78](https://wordpress.org/support/users/jakej78/)
 * (@jakej78)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879222)
 * Aha, got it to work. Thanks guys, much appreciated.
 *  [galleryuccs](https://wordpress.org/support/users/galleryuccs/)
 * (@galleryuccs)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879528)
 * 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
 *  [amphor](https://wordpress.org/support/users/amphor/)
 * (@amphor)
 * [17 years, 6 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879529)
 * nvm anymore
 *  [easydoor](https://wordpress.org/support/users/easydoor/)
 * (@easydoor)
 * [17 years, 3 months ago](https://wordpress.org/support/topic/php-include-help-1/#post-879581)
 * 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&#8221](http://flux.fan-de-cinema.com/cinemas/stars-arpajon.html&#8221););?
   > “
    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](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
 *  [vizionquest](https://wordpress.org/support/users/vizionquest/)
 * (@vizionquest)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/php-include-help-1/#post-879590)
 * 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](http://wordpress.org/support/topic/246237)
 * Any help you could provide would be greatly appreciated, thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘PHP include help’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 7 participants
 * Last reply from: [vizionquest](https://wordpress.org/support/users/vizionquest/)
 * Last activity: [17 years, 1 month ago](https://wordpress.org/support/topic/php-include-help-1/#post-879590)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
