<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Convergency&#187; php</title>
	<atom:link href="http://www.convergency.co.uk/blog/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.convergency.co.uk/blog</link>
	<description>Where everything comes together</description>
	<lastBuildDate>Fri, 20 Jan 2012 10:03:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Problem with php includes when upgrading from PHP4 to PHP5</title>
		<link>http://www.convergency.co.uk/blog/2008/10/problem-with-php-includes-when-upgrading-from-php4-to-php5/</link>
		<comments>http://www.convergency.co.uk/blog/2008/10/problem-with-php-includes-when-upgrading-from-php4-to-php5/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 22:53:55 +0000</pubDate>
		<dc:creator>nommo</dc:creator>
				<category><![CDATA[web stuff]]></category>
		<category><![CDATA[annoyances]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web sites]]></category>

		<guid isPermaLink="false">http://www.convergency.co.uk/blog/?p=70</guid>
		<description><![CDATA[A friend come client of mine had a problem today &#8211; he was getting errors with his website, but had done nothing to the site. Errors a bit like this:
Warning: include() [function.include]: URL file-access is disabled in the server configuration  &#8230; <a href="http://www.convergency.co.uk/blog/2008/10/problem-with-php-includes-when-upgrading-from-php4-to-php5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A friend come client of mine had a problem today &#8211; he was getting errors with his website, but had done nothing to the site. Errors a bit like this:</p>
<p><code>Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/user/public_html/page.php on line xx</p>
<p>Warning: include(http://www.somedomain.com/file.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/user/public_html/page.php on line xx</p>
<p>Warning: include() [function.include]: Failed opening ‘http://www.somedomain.com/file.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/user/public_html/page.php on line xx</code></p>
<p>I figured it must have been something the hosting company did&#8230; it turned out to be right &#8211; they had upgraded from PHP4 to PHP5 &#8211; which doesn&#8217;t allow remote file includes (in order to prevent cross site scripting). On further investigation (involving me having to remember the username/password combination!) I discovered that the site (which I didn&#8217;t build) wasn&#8217;t actually pulling in remote headers, but was using a full url string like:</p>
<p><code>< ?php include("http://www.somedomain.com/includes/head.php"); ?> </code></p>
<p>So after a quick hunt around (my PHP isn&#8217;t great), I found <a href="http://blog.everymanhosting.com/php-coding/warning-include-functioninclude-url-file-access-is-disabled-in-the-server-configuration/" onclick="pageTracker._trackPageview('/outgoing/blog.everymanhosting.com/php-coding/warning-include-functioninclude-url-file-access-is-disabled-in-the-server-configuration/?referer=');">this blog post</a> which reminded me of the answer I already knew but lacked the confidence to believe. I changed line to say:</p>
<p><code>< ?php include("includes/head.php"); ?> </code></p>
<p>And that worked. All I needed to do was download the rest of the PHP files and ran a multiple file  search and replace on all the php files &#8211; backup the old site and reupload the amended code.</p>
<p>All working again. I just thought I would share that.</p>
<div class="shr-publisher-70"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fwww.convergency.co.uk%2Fblog%2F2008%2F10%2Fproblem-with-php-includes-when-upgrading-from-php4-to-php5%2F' data-shr_title='Problem+with+php+includes+when+upgrading+from+PHP4+to+PHP5'></a><a class='shareaholic-fbsend' data-shr_href='http%3A%2F%2Fwww.convergency.co.uk%2Fblog%2F2008%2F10%2Fproblem-with-php-includes-when-upgrading-from-php4-to-php5%2F'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fwww.convergency.co.uk%2Fblog%2F2008%2F10%2Fproblem-with-php-includes-when-upgrading-from-php4-to-php5%2F' data-shr_title='Problem+with+php+includes+when+upgrading+from+PHP4+to+PHP5'></a><a class='shareaholic-tweetbutton' data-shr_count='horizontal' data-shr_href='http%3A%2F%2Fwww.convergency.co.uk%2Fblog%2F2008%2F10%2Fproblem-with-php-includes-when-upgrading-from-php4-to-php5%2F' data-shr_title='Problem+with+php+includes+when+upgrading+from+PHP4+to+PHP5'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.convergency.co.uk/blog/2008/10/problem-with-php-includes-when-upgrading-from-php4-to-php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

