Welcome Guest, Not a member yet? Register   Sign In
Error Number: 126 "Incorrect key file for table '/mysql-temp/#sql_2e14_0.MYI'; try to repair it
#2

[eluser]Rowan Wilson[/eluser]
As the other forum postings suggest, this is usually down to disk space. The fact that you report this is sporadic and doesn't occur on your dev server also suggest this is the case.

So it would be worth doing some investigation on your server hosting. Do they offer plesk or cpanel etc?

Otherwise you can do your own digging via CI:

Code:
class Diskspace extends CI_Controller
{
public function __construct()
{
  parent::__construct();
}

public function index()
{
  //set this to the drive or mount point
  $drive = '/tmp';
  $df = disk_free_space($drive);

  //bear in mind this is just a hack, outputting html from the controller is baaad practise!
  echo '<h1>Disk Space Check:</h1>';
  echo 'diskspace free on: ' . $drive . ' is ' . $this->decodeSize($df);

}

protected function decodeSize($bytes)
{  
     $types = array( 'B', 'KB', 'MB', 'GB', 'TB' );

     for( $i = 0; $bytes >= 1024 && $i < ( count( $types ) -1 ); $bytes /= 1024, $i++ );
     return( round( $bytes, 2 ) . " " . $types[$i] );
}


}

Index function and decodeSize function adapted from here: http://php.net/manual/en/function.disk-free-space.php

Bear in mind, depending what 'security' your host is running, like open_basedir etc this may or may not work. You'll need to amend the $drive variable to suit your needs.

Then point your browser at /diskspace and see what it reports.



HTH


Messages In This Thread
Error Number: 126 "Incorrect key file for table '/mysql-temp/#sql_2e14_0.MYI'; try to repair it - by El Forum - 01-02-2013, 01:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB