<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: Files and Images admin sections gives a 500 Internal Server Error</title>
			<link>http://www.silverstripe.org/archive/show/24668?start=0#post80669</link>
			<description>&lt;p&gt;Hey, so did this fix your error as I am about to deploy from localhost to Mediatemple's (gs) setup and am a little concerned at the possibility for errors at the later stages of a project I am working on - to the point I might need to move the host if this isn't fixed.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Files and Images admin sections gives a 500 Internal Server Error &lt;a href=&quot;http://www.silverstripe.org/archive/show/24668?start=0#post80669&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/24668?start=0#post80669&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Sat, 31 May 2008 10:00:34 +1200</pubDate>
			<dc:creator>tutmeister</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/24668?start=0#post80669</guid>
		</item>
		
		<item>
			<title>Files and Images admin sections gives a 500 Internal Server Error</title>
			<link>http://www.silverstripe.org/archive/show/24668#post24668</link>
			<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Okay, weird problem time.&lt;/p&gt;&lt;p&gt;A SS site I deployed, working just fine on the dev server, has choked up on a shared server (MediaTemple). Just updated to 2.2.1, and weirdness is happening.&lt;/p&gt;&lt;p&gt;Specifically, the site itself is okay, and the admin section works, EXCEPT for the Files and Images section. This was working once, but now it's broken.&lt;/p&gt;&lt;p&gt;It throws a 500 Internal Server Error - I found where in the Debug.php file and put in its friendly stack trace. Here's the test (domain edited out for safety):&lt;/p&gt;&lt;p&gt;-----&lt;br /&gt;Debug::friendlyError(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array) &lt;br /&gt;line 115 of Debug.php&lt;/p&gt;&lt;p&gt;Debug::fatalHandler(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array) &lt;br /&gt;line 328 of Debug.php&lt;/p&gt;&lt;p&gt;errorHandler(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array) &lt;/p&gt;&lt;p&gt;user_error(DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),256) &lt;br /&gt;line 397 of Database.php&lt;/p&gt;&lt;p&gt;Database-&amp;gt;databaseError(Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),256) &lt;br /&gt;line 106 of MySQLDatabase.php&lt;/p&gt;&lt;p&gt;MySQLDatabase-&amp;gt;query(SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1,256) &lt;br /&gt;line 79 of DB.php&lt;/p&gt;&lt;p&gt;DB::query(SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) &amp;gt; 1) &lt;br /&gt;line 73 of Folder.php&lt;/p&gt;&lt;p&gt;Folder-&amp;gt;syncChildren() &lt;br /&gt;line 211 of File.php&lt;/p&gt;&lt;p&gt;File::sync() &lt;br /&gt;line 78 of AssetAdmin.php&lt;/p&gt;&lt;p&gt;AssetAdmin-&amp;gt;index(Array) &lt;br /&gt;line 210 of Controller.php&lt;/p&gt;&lt;p&gt;Controller-&amp;gt;run(Array) &lt;br /&gt;line 76 of Director.php&lt;/p&gt;&lt;p&gt;Director::direct(admin/assets/) &lt;br /&gt;line 104 of main.php&lt;br /&gt;-----&lt;/p&gt;&lt;p&gt;I've tried flushing the cache, rebuilding the database, and trying to find where the heck it's trying to write to /tmp/ (which is not available on the shared host, so I'm using the silverstripe-cache folder in the web root).&lt;/p&gt;&lt;p&gt;It's only started happening recently, and I'm not sure why - or how to fix it. All other admin functions are working as expected.&lt;/p&gt;&lt;p&gt;Any ideas, thoughts etc. appreciated. Thanks.&lt;/p&gt;&lt;p&gt;[EDIT]&lt;/p&gt;&lt;p&gt;Okay, seems to be a MySQL infrequent problem. Specifically, here: &lt;a href=&quot;http://bugs.mysql.com/bug.php?id=9551&quot;&gt;http://bugs.mysql.com/bug.php?id=9551&lt;/a&gt;&lt;/p&gt;&lt;p&gt;My solution, whilst inelegant, was to DROP the File table, and then run a /db/build?flush=1 to recreate it.&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: Files and Images admin sections gives a 500 Internal Server Error &lt;a href=&quot;http://www.silverstripe.org/archive/show/24668#post24668&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/24668#post24668&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Fri, 11 Jan 2008 14:34:43 +1300</pubDate>
			<dc:creator>darkowl</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/24668#post24668</guid>
		</item>
		

	</channel>
</rss>