2014-03-27 72 views
1

我有一個奇怪的問題,phpmyadmin 4.0.10。首先我運行這個版本,因爲我的mysql版本是5.1.57。phpMyAdmin配置存儲錯誤

我有phpmyadmin設置和除存儲設置以外的所有配置。我創建了phpmyadmin數據庫和必要的表格。我也創建了pma用戶並確保它的所有權限都是正確的。在我的配置文件中,我添加了此用戶的設置並通過密碼進行了複製。

如果我現在保存我的配置而不實際設置存儲數據庫和表,那麼一切正常。但是,如果我啓用這些表格,則每當我嘗試將列添加到表結構中時,都會在我的日誌中看到以下錯誤500消息。

PHP Fatal error: Call to undefined function ._Application_Octetstream_Download_getInfo() in /htdocs/phpmyadmin/libraries/transformations.lib.php on line 153 

任何想法這裏發生了什麼?我刪除並重新創建了我的phpmyadmin數據庫。我已刪除並重新創建了pma用戶。我刪除並重新創建了我的配置文件,這就是我最終將這個錯誤追蹤到存儲表的原因。

如果有幫助,這是導致該問題的transformations.lib.php文件中的一段代碼:

/** 
* Returns the description of the transformation 
* 
* @param string $file   transformation file 
* @param boolean $html_formatted whether the description should be formatted 
*        as HTML 
* 
* @return String the description of the transformation 
*/ 
function PMA_getTransformationDescription($file, $html_formatted = true) 
{ 
    // get the transformation class name 
    $class_name = explode(".class.php", $file); 
    $class_name = $class_name[0]; 

    // include and instantiate the class 
    include_once 'libraries/plugins/transformations/' . $file; 
    return $class_name::getInfo(); 
} 

回答

0

通過我結束了在此功能的代碼細算。

/** 
* Gets all available MIME-types 
* 
* @access public 
* @staticvar array mimetypes 
* @return array array[mimetype], array[transformation] 
*/ 
function PMA_getAvailableMIMEtypes() 
{ 
    static $stack = null; 

    if (null !== $stack) { 
     return $stack; 
    } 

    $stack = array(); 
    $filestack = array(); 

    $handle = opendir('./libraries/plugins/transformations'); 

    if (! $handle) { 
     return $stack; 
    } 

    while ($file = readdir($handle)) { 
     $filestack[] = $file; 
    } 

    closedir($handle); 
    sort($filestack); 

    foreach ($filestack as $file) { 
     if (preg_match('|^.*_.*_.*\.class\.php$|', $file)) { 
      // File contains transformation functions. 
      $parts = explode('_', str_replace('.class.php', '', $file)); 
      $mimetype = $parts[0] . "/" . $parts[1]; 
      $stack['mimetype'][$mimetype] = $mimetype; 
      $stack['transformation'][] = $mimetype . ': ' . $parts[2]; 
      $stack['transformation_file'][] = $file; 

     } elseif (preg_match('|^.*\.class.php$|', $file)) { 
      // File is a plain mimetype, no functions. 
      $base = str_replace('.class.php', '', $file); 

      if ($base != 'global') { 
       $mimetype = str_replace('_', '/', $base); 
       $stack['mimetype'][$mimetype] = $mimetype; 
       $stack['empty_mimetype'][$mimetype] = $mimetype; 
      } 
     } 
    } 

    return $stack; 
} 

我的PHP技能是有限的,但我可以告訴它通讀文件在plugins /轉換目錄,並返回這些文件的名稱來引用此功能的腳本。當我從終端瀏覽這個目錄時,我注意到它裏面充滿了由finder創建的._文件。我使用一個mac來完成我的開發,並且我使用finder而不是wget取出了這個phpmyadmin的最新副本,因此所有這些._文件都已創建。有關它們的東西搞砸了這個功能,一旦我用基本級別的find命令刪除它們,一切都按預期工作。下面是任何人都遇到類似的東西find命令:

find . -type f -name '._*' -exec rm {} \; 

再次,運行在phpMyAdmin的目錄的基礎水平,都應該很好。

+0

這已經在phpmyadmin中得到修復,並且應該很快使它成爲發佈渠道的方式。 – Cloudkiller