<rss version="2.0">
		<channel>
			<title>Plogger Support Forum - Cannot Upload Images Due To Hosts</title>
			<lastBuildDate>Sun, 19 Apr 2026 08:29:50 +0000</lastBuildDate>
			<link>http://www.plogger.org/forum/</link>
			<description></description>
			<generator>Lussumo Vanilla 1.1.10</generator>
			<item>
		<title>Cannot Upload Images Due To Hosts</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1599#Comment_1599</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1599#Comment_1599</guid>
		<pubDate>Tue, 20 Dec 2005 07:48:18 +0000</pubDate>
		<author>eiffel</author>
		<description>
			<![CDATA[I've been having problems since the initial install with uploading images.<br /><br />What happens is that i go through the upload page, click 'upload' and nothing happens.  The yellow message box at the is empty and nothing else about the site has changed.  No upload.  The import page works fine though.<br /><br />From other posts on this site, I've tried putting<br /><br /><blockquote >error_reporting(E_ALL);</blockquote><br /><br />at the top of  my globals.php.  This gave me this php error:<br /><br /><blockquote >Warning: rename(): open_basedir restriction in effect. File(/tmp/phpCnQApk) is not within the allowed path(s): (/home/mydomain/public_html) in /home/mydomain/public_html/plogger/admin/plog-admin-functions.php on line 62</blockquote><br /><br />The open_basedir error ran a bell from my hosts supanames.co.uk as I've had problems installing other php software (oscommerce) on their servers before.<br /><br />I tracked this down again to this page:<br /><br /><blockquote >http://www.supanames.com/support/open_basedir.html</blockquote><br /><br />which states:<br /><br /><blockquote >If you experience the open_basedir security message when using an image upload script we recommend that you change any copy() commands found within the script to the command move_uploaded_file().</blockquote><br /><br />So, I uncommented line 59 in plog-admin-functions.php and commented line 60, like so:<br /><br /><blockquote >if (!move_uploaded_file($tmpname,$final_fqfn)) {<br />//	if (!rename($tmpname,$final_fqfn)) {<br />		$result['errors'] .= 'Could not move file! ' . $tmpname .' to '.$final_fqfn;<br />		return $result;<br />	};</blockquote><br /><br />And now the upload page works.<br /><br />But the import page doesn't.   <br /><br />Does anyone know what i can do to get around my hosts restrictions so that i can have both upload and import pages working.  Or do i have to chose one or the other?]]>
		</description>
	</item>
	<item>
		<title>Cannot Upload Images Due To Hosts</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1623#Comment_1623</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1623#Comment_1623</guid>
		<pubDate>Wed, 21 Dec 2005 13:05:46 +0000</pubDate>
		<author>eiffel</author>
		<description>
			<![CDATA[maybe the problem is that the rename function is trying to write to /tmp - which my hosts won't allow.<br /><br />is there maybe something i can change so that it writes to /home/mydomain/public_html/tmp instead?]]>
		</description>
	</item>
	<item>
		<title>Cannot Upload Images Due To Hosts</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1625#Comment_1625</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1625#Comment_1625</guid>
		<pubDate>Wed, 21 Dec 2005 14:03:37 +0000</pubDate>
		<author>mike</author>
		<description>
			<![CDATA[You could try using move_uploaded_file() instead of rename().  More info here: http://us3.php.net/move_uploaded_file.]]>
		</description>
	</item>
	<item>
		<title>Cannot Upload Images Due To Hosts</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1743#Comment_1743</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1743#Comment_1743</guid>
		<pubDate>Wed, 04 Jan 2006 09:38:41 +0000</pubDate>
		<author>eiffel</author>
		<description>
			<![CDATA[yeah - that's what i'vew done by uncommmenting <br /><br /><blockquote >if (!move_uploaded_file($tmpname,$final_fqfn)) {</blockquote><br /><br />and commenting <br /><br /><blockquote >if (!rename($tmpname,$final_fqfn)) {</blockquote><br /><br />This works for the upload page - problem is that now the import page is broken.<br /><br />Above where I've done that in plog-admin-functions.php there is this comment:<br /><br /><blockquote >// cannot use move_uploaded_file here, because plog-import uses the same function and <br />	// and doesn't deal with uploaded files</blockquote><br /><br />So is it possible for me to have both import and upload working with these hosts?]]>
		</description>
	</item>
	<item>
		<title>Cannot Upload Images Due To Hosts</title>
		<link>http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1746#Comment_1746</link>
		<guid isPermaLink="false">http://www.plogger.org/forum/comments.php?DiscussionID=315&amp;Focus=1746#Comment_1746</guid>
		<pubDate>Wed, 04 Jan 2006 11:17:46 +0000</pubDate>
		<author>anti</author>
		<description>
			<![CDATA[I fixed this in SVN, you can see my solution at http://dev.plogger.org/file/trunk/admin/plog-admin-functions.php?rev=297]]>
		</description>
	</item>
	
		</channel>
	</rss>