Posted by Mario Mansour in TubePress
It has came to my attention that some of you are having problems running TubePress.NET on their hosting servers.
If you are getting Warning Messages like this oneWarning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in /xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/wp-content/plugins/tubepress.net/tubepress.php on line 384
Where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the path to the wordpress installation on your server
This means that your server configuration is blocking external file access, which in consequence blocks TubePress from accessing Youtube.
Solution:
allow_url_fopen should be ON in PHP configuration (php.ini). Probably, you don’t have access to edit this file and it could also be that your hosting company has restricted changing the allow_url_fopen value. In this case, you should refer to them and ask them to set the value of allow_url_fopen to ON.
On my side, TubePress will try to change the value of allow_url_fopen but if this action is restricted, it will ask you to contact your web hosting provider.
Many users have been asking me to recommend a good hosting. To be honest none cheap web hosting provider is perfect, you have to make a compromise between budget and requirements. It is obvious that the more you require from your server the more you will need to pay and the more you disregard features the more your hosting bills will shrink.
Good web hosting companies that have affordable hosting plans are mediatemple, dreamhost, ThinkHost. I would also recommend you to have a dedicated server instead of a shared hosting, it gives more freedom and saves you some headaches.






















August 26th, 2008 at 12:56 pm
Thanks for the reply.
It is not an option for me to use this – is there any adjustment that can be made to the code to allow compatibility with shared hosting, since many wordpress users utilize shared hosting?
September 15th, 2008 at 12:50 am
I added to my php.ini file and still not working.
September 15th, 2008 at 10:26 pm
What about this problem that I am all of a sudden getting?
Warning: Invalid argument supplied for foreach() in /home/content/s/e/o/seoreel/html/wp-content/plugins/tubepress.net/tubepress.php on line 441
October 23rd, 2008 at 7:24 am
thanks
December 13th, 2008 at 3:18 pm
URL file-access is disabled in the server configuration
how can i solve this problem without contacting to host provider
December 25th, 2008 at 1:30 pm
well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch
December 29th, 2008 at 4:36 pm
crzammctrnnwmukvwell, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch
January 30th, 2009 at 3:03 am
archetypal buy cialis feigned
January 30th, 2009 at 3:14 am
not counting cialis photoduplication
February 10th, 2009 at 9:42 am
usually you can have a local copy of the php.ini file with all the mods you need. This local copy gets priority from the web server (I believe).
February 18th, 2009 at 9:32 pm
Assuming that cURL is enabled (which it usually is), you can easily get around that restriction by creating your own custom function to carry out the same actions. I’m not familiar with ‘TubePress’ or whatever it is that most of you are having issues with, but if you’re comfortable with PHP, you could do a simple replacement:
Replace this:
file_get_contents
With this:
curl_get_contents
In all files/folders.
Then create a file (with any name, extension .php, e.g. myinc.php), with the contents:
Then in any file which originally made a call to file_get_contents, at the top, add:
Although somewhat tedious (depending on how many replacements you’ll have to do, I have no idea, having never used the software) – it should work in most cases.
February 18th, 2009 at 9:35 pm
I’m guessing the owner of this blog is using strip_tags() for security.
Let’s try this:
<?php
/////////////////////////////////////////////
// copyright (c) 2009 adam@papsy.net etc etc
/////////////////////////////////////////////
if (!defined("ch"))
{
function setupch()
{
$ch = curl_init();
$c = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
return($ch);
}
define("ch", setupch());
function curl_get_contents($url)
{
$c = curl_setopt(ch, CURLOPT_URL, $url);
return(curl_exec(ch));
}
}
?>
February 18th, 2009 at 9:38 pm
So to summarize:
1) Replace all occurrences of file_get_contents with curl_get_contents
2) Add the following code to the top of any file you made that replacement in:
<?php
require_once("myinc.php");
?>
3) Create a new file (named myinc.php), with the contents being:
<?php
/////////////////////////////////////////////
// copyright (c) 2009 adam@papsy.net etc etc
/////////////////////////////////////////////
if (!defined("ch"))
{
function setupch()
{
$ch = curl_init();
$c = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
return($ch);
}
define("ch", setupch());
function curl_get_contents($url)
{
$c = curl_setopt(ch, CURLOPT_URL, $url);
return(curl_exec(ch));
}
}
?>
March 3rd, 2009 at 7:33 am
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
April 15th, 2009 at 8:21 am
I can tell that this is not the first time at all that you mention the topic. Why have you decided to touch it again?
June 20th, 2009 at 6:12 am
Thank you papsy, that would have stumped me for days…
June 25th, 2009 at 9:20 am
Thank you very much! It was very use full inforamtion!
October 14th, 2009 at 12:18 pm
this sucks i had the same error but with another service. I was hoping to find a solution here but the php stuff i dont really understand that well. Im still in search of a simple solution to this.
October 21st, 2009 at 3:08 pm
@samiemathews82: papsy’s response #13 is the simple solution.
Some servers have allow_url_include disabled for better security. Starting with PHP 5.2.X allow_url_include is disabled by default. So you only two easy solutions are to:
1. Convince your web host to turn allow_url_fopen and allow_url_include on. Unlikely but they might do it.
2. Use CURL. papsy’s response #13 is really the easiest way to do this.
February 4th, 2010 at 11:36 pm
It’s much easier to use the built in WordPress HTTP API:
$url = ‘http://www.example.com/file.cfm’;
$request = new WP_Http;
$result = $request->request( $url );
echo $result['body'];