Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Archive
SilverStripe Forums » Archive » Files and Images admin sections gives a 500 Internal Server Error
Our old forums are still available as a read-only archive.
|
Page:
1
|
Go to End | |
| Author | Topic: Files and Images admin sections gives a 500 Internal Server Error | 4495 Views |
-
Files and Images admin sections gives a 500 Internal Server Error

11 January 2008 at 2:34pm Last edited: 11 January 2008 2:56pm
Hi,
Okay, weird problem time.
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.
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.
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):
-----
Debug::friendlyError(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array)
line 115 of Debug.phpDebug::fatalHandler(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array)
line 328 of Debug.phperrorHandler(256,DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),/[myserver.com]/html/sapphire/core/model/Database.php,397,Array)
user_error(DATABASE ERROR: Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),256)
line 397 of Database.phpDatabase->databaseError(Couldn't run query: SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1 | Can't create/write to file '/tmp/#sql_3db3_0.MYI' (Errcode: 17),256)
line 106 of MySQLDatabase.phpMySQLDatabase->query(SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1,256)
line 79 of DB.phpDB::query(SELECT Name FROM `File` WHERE ParentID = 0 GROUP BY Name HAVING count(*) > 1)
line 73 of Folder.phpFolder->syncChildren()
line 211 of File.phpFile::sync()
line 78 of AssetAdmin.phpAssetAdmin->index(Array)
line 210 of Controller.phpController->run(Array)
line 76 of Director.phpDirector::direct(admin/assets/)
line 104 of main.php
-----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).
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.
Any ideas, thoughts etc. appreciated. Thanks.
[EDIT]
Okay, seems to be a MySQL infrequent problem. Specifically, here: http://bugs.mysql.com/bug.php?id=9551
My solution, whilst inelegant, was to DROP the File table, and then run a /db/build?flush=1 to recreate it.
-
Re: Files and Images admin sections gives a 500 Internal Server Error

31 May 2008 at 10:00am
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.
| 4495 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: xterso, joelg, Webdoc
Welcome to our latest member: AlfonsoGrondo


