Title: &quot;Include&quot; php code getting error messages
Last modified: August 30, 2016

---

# "Include" php code getting error messages

 *  Resolved [Nabonga](https://wordpress.org/support/users/nabonga/)
 * (@nabonga)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-php-code-getting-error-messages/)
 * I am trying to get code from a php file to show up on a WordPress page.
    This
   code is supposed to insert a Google Adsense banner on the page and does just 
   that on a non-Wordpress page but not on a WordPress page.
 * Using the “Insert PHP WordPress Plugin” instructions I inserted this code into
   my WordPress page which is supposed to refer to a separate php page. This is 
   the code that is supposed to work with the plugin:
 * [insert_php]
    include(“[http://www.builtreport.com/include_adsense_3.php&#8221](http://www.builtreport.com/include_adsense_3.php&#8221););[/
   insert_php]
 * This is how I was typing the code on my non-Wordpress page:
 * <?php
    include(“[http://www.builtreport.com/include_adsense_3.php&#8221](http://www.builtreport.com/include_adsense_3.php&#8221););?
   >
 * I get 3 error messages which are below the shark picture on this page
    instead
   of a Adsense banner ad: [http://testwordpress.builtreport.com/italian-movies/2nd-post/](http://testwordpress.builtreport.com/italian-movies/2nd-post/)
 * The error messages:
 * Warning: include(): http:// wrapper is disabled in the server configuration by
   allow_url_include=0 in /home/tr33h0useh0use/public_html/testwordpress.builtreport.
   com/wp-content/plugins/insert-php/insert_php.php(48) : eval()’d code on line 
   2
 * Warning: include([http://www.builtreport.com/include_adsense_3.php](http://www.builtreport.com/include_adsense_3.php)):
   failed to open stream: no suitable wrapper could be found in /home/tr33h0useh0use/
   public_html/testwordpress.builtreport.com/wp-content/plugins/insert-php/insert_php.
   php(48) : eval()’d code on line 2
 * Warning: include(): Failed opening ‘http://www.builtreport.com/include_adsense_3.
   php’ for inclusion (include_path=’.:/usr/local/lib/php’) in /home/tr33h0useh0use/
   public_html/testwordpress.builtreport.com/wp-content/plugins/insert-php/insert_php.
   php(48) : eval()’d code on line 2
 * [https://wordpress.org/plugins/insert-php/](https://wordpress.org/plugins/insert-php/)

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

 *  [WillBontrager](https://wordpress.org/support/users/willbontrager/)
 * (@willbontrager)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-php-code-getting-error-messages/#post-6732045)
 * Hi Nabonga,
 * I’m thinking you’re using different PHP installations for the WordPress page 
   and the non-Wordpress page.
 * The configuration for the PHP installation servicing the WordPress page seems
   to disallow [http://&#8230](http://&#8230); URLs as the parameter for the include()
   function.
 * Here’s information about URL wrappers for include()
 * [http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-include](http://php.net/manual/en/filesystem.configuration.php#ini.allow-url-include)
 * Will
 *  Thread Starter [Nabonga](https://wordpress.org/support/users/nabonga/)
 * (@nabonga)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/include-php-code-getting-error-messages/#post-6732107)
 * Thanks, WillBontrager. The problem with the WordPress plugin ‘Insert Php’ was
   on my end.
 *  With the plugin installed, I had added php insert code on a WordPress page making
   it refer to a php file in the root directory of my site, something like:
 *  [http://www.mysite.com/the_php_file.php](http://www.mysite.com/the_php_file.php)
 *  …when I should have placed the PHP file in the root of the WordPress directory
   something like:
 * [http://testwordpress.mysite.com/the_php_file.php](http://testwordpress.mysite.com/the_php_file.php)
 * **When I placed the file to be included in the right directory, the include PHP
   code on my wordpress page refered to the file correctly and placed the Google
   Adsense Banner right where I wanted in WordPress.**
 * I had thought that since I referred directly to a place where that php file was
   it would be okay but I guess the php file has to be directly in the folder where
   WordPress is installed…or something along those lines.

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

The topic ‘"Include" php code getting error messages’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Nabonga](https://wordpress.org/support/users/nabonga/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/include-php-code-getting-error-messages/#post-6732107)
 * Status: resolved