<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: URL File-Access is Disabled in the Server Configuration</title>
	<atom:link href="http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration</link>
	<description>Learn PHP Online</description>
	<lastBuildDate>Fri, 03 Sep 2010 17:39:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Nate</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-3076</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Tue, 17 Aug 2010 14:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-3076</guid>
		<description>Awesome! Exactly what I was looking for. Very easy to follow even for a novice! Thanks!</description>
		<content:encoded><![CDATA[<p>Awesome! Exactly what I was looking for. Very easy to follow even for a novice! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-2789</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Fri, 30 Jul 2010 10:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-2789</guid>
		<description>I get the following errors with fopen - is this realted? The same? Not entirely sure what to do...
 
Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/XXXX/public_html/imincludes/newsRSS.php on line 73

Warning: fopen(http://uk.informanagement.com/rss/RssPage.aspx?command=RSS&amp;nr=3&amp;length=105&amp;sjabloon=XXXXX) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/XXXX/public_html/imincludes/newsRSS.php on line 73
could not open XML input</description>
		<content:encoded><![CDATA[<p>I get the following errors with fopen &#8211; is this realted? The same? Not entirely sure what to do&#8230;</p>
<p>Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/XXXX/public_html/imincludes/newsRSS.php on line 73</p>
<p>Warning: fopen(http://uk.informanagement.com/rss/RssPage.aspx?command=RSS&amp;nr=3&amp;length=105&amp;sjabloon=XXXXX) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/XXXX/public_html/imincludes/newsRSS.php on line 73<br />
could not open XML input</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-2207</link>
		<dc:creator>Ivan</dc:creator>
		<pubDate>Tue, 08 Jun 2010 21:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-2207</guid>
		<description>Awesome, thanks so much :-)</description>
		<content:encoded><![CDATA[<p>Awesome, thanks so much <img src='http://www.learnphponline.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drazsha</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-2043</link>
		<dc:creator>Drazsha</dc:creator>
		<pubDate>Fri, 07 May 2010 02:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-2043</guid>
		<description>Thanks so much for posting (original article). My site suddenly disappeared one day and tech support was hopeless, so this really let me know exactly what was going on.</description>
		<content:encoded><![CDATA[<p>Thanks so much for posting (original article). My site suddenly disappeared one day and tech support was hopeless, so this really let me know exactly what was going on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1997</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 28 Apr 2010 02:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1997</guid>
		<description>I use the previous code to read in images and then process them. It will not work for PHP files (unless you want the output), but its great with any other binary data.</description>
		<content:encoded><![CDATA[<p>I use the previous code to read in images and then process them. It will not work for PHP files (unless you want the output), but its great with any other binary data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1996</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 28 Apr 2010 02:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1996</guid>
		<description>Actually you can also use CURL. Here is a snippet that should help someone get started. Note: I just copy-pasted from my working code, so theres stuff you won&#039;t need.



if($_SERVER[&#039;HTTP_HOST&#039;] == &quot;127.0.0.1&quot;)
{
     $filenameText = &quot;http://&quot;.$_SERVER[&#039;HTTP_HOST&#039;].&quot;/crmascotas/functions/textToImage.php?text=&quot;.$_GET[&#039;text&#039;].&quot;&amp;fontname=$CRM_CONST[PolaroidTextFont]&amp;size=$CRM_CONST[PolaroidTextSize]&amp;bgcolor=efefef&amp;fgcolor=000000&quot;;
} else
{
     $filenameText = &quot;http://&quot;.$_SERVER[&#039;HTTP_HOST&#039;].&quot;/functions/textToImage.php?text=&quot;.$_GET[&#039;text&#039;].&quot;&amp;fontname=$CRM_CONST[PolaroidTextFont]&amp;size=$CRM_CONST[PolaroidTextSize]&amp;bgcolor=efefef&amp;fgcolor=000000&quot;;
}



$options = array(
    CURLOPT_RETURNTRANSFER =&gt; true,     // return web page
    CURLOPT_HEADER         =&gt; false,    // don&#039;t return headers
    CURLOPT_FOLLOWLOCATION =&gt; true,     // follow redirects
    CURLOPT_ENCODING       =&gt; &quot;&quot;,       // handle all encodings
    CURLOPT_USERAGENT      =&gt; &quot;robs&quot;,   // who am i
    CURLOPT_AUTOREFERER    =&gt; true,     // set referer on redirect
    CURLOPT_CONNECTTIMEOUT =&gt; 120,      // timeout on connect
    CURLOPT_TIMEOUT        =&gt; 120,      // timeout on response
    CURLOPT_MAXREDIRS      =&gt; 10,       // stop after 10 redirects
);

$ch = curl_init($filenameText);
curl_setopt_array( $ch, $options );
$content = curl_exec( $ch );
$err     = curl_errno( $ch );
$errmsg  = curl_error( $ch );
$header  = curl_getinfo( $ch );
curl_close( $ch );



$header[&#039;errno&#039;]   = $err;
$header[&#039;errmsg&#039;]  = $errmsg;
$header[&#039;content&#039;] = $content;

$text = imagecreatefromstring($header[&#039;content&#039;]);</description>
		<content:encoded><![CDATA[<p>Actually you can also use CURL. Here is a snippet that should help someone get started. Note: I just copy-pasted from my working code, so theres stuff you won&#8217;t need.</p>
<p>if($_SERVER['HTTP_HOST'] == &#8220;127.0.0.1&#8243;)<br />
{<br />
     $filenameText = &#8220;http://&#8221;.$_SERVER['HTTP_HOST'].&#8221;/crmascotas/functions/textToImage.php?text=&#8221;.$_GET['text'].&#8221;&amp;fontname=$CRM_CONST[PolaroidTextFont]&amp;size=$CRM_CONST[PolaroidTextSize]&amp;bgcolor=efefef&amp;fgcolor=000000&#8243;;<br />
} else<br />
{<br />
     $filenameText = &#8220;http://&#8221;.$_SERVER['HTTP_HOST'].&#8221;/functions/textToImage.php?text=&#8221;.$_GET['text'].&#8221;&amp;fontname=$CRM_CONST[PolaroidTextFont]&amp;size=$CRM_CONST[PolaroidTextSize]&amp;bgcolor=efefef&amp;fgcolor=000000&#8243;;<br />
}</p>
<p>$options = array(<br />
    CURLOPT_RETURNTRANSFER =&gt; true,     // return web page<br />
    CURLOPT_HEADER         =&gt; false,    // don&#8217;t return headers<br />
    CURLOPT_FOLLOWLOCATION =&gt; true,     // follow redirects<br />
    CURLOPT_ENCODING       =&gt; &#8220;&#8221;,       // handle all encodings<br />
    CURLOPT_USERAGENT      =&gt; &#8220;robs&#8221;,   // who am i<br />
    CURLOPT_AUTOREFERER    =&gt; true,     // set referer on redirect<br />
    CURLOPT_CONNECTTIMEOUT =&gt; 120,      // timeout on connect<br />
    CURLOPT_TIMEOUT        =&gt; 120,      // timeout on response<br />
    CURLOPT_MAXREDIRS      =&gt; 10,       // stop after 10 redirects<br />
);</p>
<p>$ch = curl_init($filenameText);<br />
curl_setopt_array( $ch, $options );<br />
$content = curl_exec( $ch );<br />
$err     = curl_errno( $ch );<br />
$errmsg  = curl_error( $ch );<br />
$header  = curl_getinfo( $ch );<br />
curl_close( $ch );</p>
<p>$header['errno']   = $err;<br />
$header['errmsg']  = $errmsg;<br />
$header['content'] = $content;</p>
<p>$text = imagecreatefromstring($header['content']);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rock</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1747</link>
		<dc:creator>rock</dc:creator>
		<pubDate>Sun, 07 Mar 2010 01:23:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1747</guid>
		<description>Hi, I&#039;m still unsure about how to implement the suggested best solution,

For example, I have 2 sites, A and B. A has the file that I want to reuse on B.

how do I write the include code for B using the best solution method?</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;m still unsure about how to implement the suggested best solution,</p>
<p>For example, I have 2 sites, A and B. A has the file that I want to reuse on B.</p>
<p>how do I write the include code for B using the best solution method?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blake</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1474</link>
		<dc:creator>Blake</dc:creator>
		<pubDate>Thu, 21 Jan 2010 18:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1474</guid>
		<description>I have always used relative URLs but went with absolute for a new website. Everything was fine until the web host turned allow_url_fopen off. A little (lot) of find and replace and I am back up and running. Thanks for pointing out the fix!</description>
		<content:encoded><![CDATA[<p>I have always used relative URLs but went with absolute for a new website. Everything was fine until the web host turned allow_url_fopen off. A little (lot) of find and replace and I am back up and running. Thanks for pointing out the fix!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1465</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Tue, 19 Jan 2010 19:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1465</guid>
		<description>Thanks so much for posting this.  It was a dead-on fix.  I do not host my website on my own servers so I didn&#039;t know PHP had been upgraded so it caught me off guard.  I was able to fix it quickly thanks to your article.

AWESOME!!!MJI</description>
		<content:encoded><![CDATA[<p>Thanks so much for posting this.  It was a dead-on fix.  I do not host my website on my own servers so I didn&#8217;t know PHP had been upgraded so it caught me off guard.  I was able to fix it quickly thanks to your article.</p>
<p>AWESOME!!!MJI</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.learnphponline.com/errors/url-file-access-is-disabled-in-the-server-configuration/comment-page-1#comment-1431</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 14 Jan 2010 03:09:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnphponline.com/?p=86#comment-1431</guid>
		<description>Thanks, this really helps!</description>
		<content:encoded><![CDATA[<p>Thanks, this really helps!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
