SQLSTATE[HY000]: General error: 26 file is encrypted or is not a database

Location: Line 47 of /var/www/recess/recess/lib/recess/database/pdo/SqliteDataSourceProvider.class.php

  • 43:     * @param string $table Table whose columns to list.
  • 44:     * @return array(string) Column names sorted alphabetically.
  • 45:     */
  • 46:    function getColumns($table) {
  • 47:        $results $this->pdo->query('PRAGMA table_info("' $table '");');
  • 48:        
  • 49:        $columns = array();
  • 50:        
  • 51:        foreach($results as $result) {
  • 52:            $columns[] = $result['name'];

Call Stack

  • 15
    PDO->query( 'PRAGMA table_info("recess_tools_classes");' )
    • called at Line 47 of /var/www/recess/recess/lib/recess/database/pdo/SqliteDataSourceProvider.class.php

    Arguments Passed In

    Type Value
    string 'PRAGMA table_info("recess_tools_classes");'

    Called From

    • 43:     * @param string $table Table whose columns to list.
    • 44:     * @return array(string) Column names sorted alphabetically.
    • 45:     */
    • 46:    function getColumns($table) {
    • 47:        $results $this->pdo->query('PRAGMA table_info("' $table '");');
    • 48:        
    • 49:        $columns = array();
    • 50:        
    • 51:        foreach($results as $result) {
    • 52:            $columns[] = $result['name'];
  • 14
    SqliteDataSourceProvider->getColumns( 'recess_tools_classes' )
    • called at Line 172 of /var/www/recess/recess/lib/recess/database/pdo/PdoDataSource.class.php

    Arguments Passed In

    Type Value
    string 'recess_tools_classes'

    Called From

    • 168:    function getColumns($table) {
    • 169:        $cacheKey $this->cachePrefix $table '::Columns';
    • 170:        $columns Cache::get($cacheKey);
    • 171:        if(!$columns) {
    • 172:            $columns $this->provider->getColumns($table);
    • 173:            Cache::set($cacheKey$columns);
    • 174:        }
    • 175:        return $columns;
    • 176:    }
    • 177:    
  • 13
    PdoDataSource->getColumns( 'recess_tools_classes' )
    • called at Line 533 of /var/www/recess/recess/lib/recess/database/orm/Model.class.php

    Arguments Passed In

    Type Value
    string 'recess_tools_classes'

    Called From

    • 529:    
    • 530:    function setTable($table$loadColumns true) {
    • 531:        $this->table $table;
    • 532:        if($loadColumns) {
    • 533:            $this->columns $this->getSource()->getColumns($this->table);
    • 534:        } else {
    • 535:            $this->columns = array();
    • 536:        }
    • 537:    }
    • 538:    
  • 12
    ModelDescriptor->setTable( 'recess_tools_classes' )
    • called at Line 22 of /var/www/recess/recess/lib/recess/database/orm/annotations/TableAnnotation.class.php

    Arguments Passed In

    Type Value
    string 'recess_tools_classes'

    Called From

    • 18:        $this->table $array[0];    
    • 19:    }
    • 20:    
    • 21:    function massage(ModelDescriptor &$descriptor) {
    • 22:        $descriptor->setTable($this->table);
    • 23:    }
    • 24:}
    • 25:?>
  • 11
    TableAnnotation->massage( ModelDescriptor )
    • called at Line 167 of /var/www/recess/recess/lib/recess/database/orm/Model.class.php

    Arguments Passed In

    Type Value
    ModelDescriptor
    ModelDescriptor
    MemberValue
    primaryKey'id'
    plural
    modelClass'RecessReflectorClass'
    relationships
    Array[3]
    KeyValue
    package
    BelongsToRelationship
    MemberValue
    name'package'
    localClass'RecessReflectorClass'
    foreignClass'RecessReflectorPackage'
    foreignKey'packageId'
    onDelete'nullify'
    through
    parent
    BelongsToRelationship
    MemberValue
    name'parent'
    localClass'RecessReflectorClass'
    foreignClass'RecessReflectorClass'
    foreignKey'parentId'
    onDelete'nullify'
    through
    children
    HasManyRelationship
    MemberValue
    name'children'
    localClass'RecessReflectorClass'
    foreignClass'RecessReflectorClass'
    foreignKey'parentId'
    onDelete'unspecified'
    through
    columns
    Array[0]
    properties
    Array[0]
    source
    primaryKeyColumn'id'

    Called From

    • 163:        
    • 164:        $annotations $reflection->getAnnotations();
    • 165:        foreach($annotations as $annotation) {
    • 166:            if($annotation instanceof ModelAnnotation) {
    • 167:                $annotation->massage($descriptor);
    • 168:            }
    • 169:        }
    • 170:        
    • 171:        $reflectedProperties $reflection->getProperties();
    • 172:        $properties = array();
  • 9
    call_user_func( 'RecessReflectorClass' )
    • called at Line 83 of /var/www/recess/recess/lib/recess/lang/RecessObject.class.php

    Arguments Passed In

    Type Value
    array
    Array[2]
    KeyValue
    0'RecessReflectorClass'
    1'buildClassDescriptor'
    string 'RecessReflectorClass'

    Called From

    • 79:            $descriptor Cache::get($cache_key);
    • 80:            
    • 81:            if($descriptor === false) {                
    • 82:                if($instance instanceof RecessObject) {
    • 83:                    $descriptor call_user_func(array($class'buildClassDescriptor'), $class);
    • 84:                    Cache::set($cache_key$descriptor);
    • 85:                    self::$descriptors[$class] = $descriptor;
    • 86:                } else {
    • 87:                    throw new RecessException('RecessObjectRegistry only retains information on classes derived from RecessObject. Class of type "' $class '" given.'get_defined_vars());
    • 88:                }
  • 8
    RecessObject::getClassDescriptor( Array, 'RecessReflectorClass' )
    • called at Line 215 of /var/www/recess/recess/lib/recess/database/orm/Model.class.php

    Arguments Passed In

    Type Value
    RecessReflectorClass
    RecessReflectorClass
    MemberValue
    id
    name'Post'
    parentId
    packageId
    docComment
    file

    Called From

    • 211:     *
    • 212:     * @return ModelSet
    • 213:     */
    • 214:    protected function getModelSet() {
    • 215:        $thisClassDescriptor self::getClassDescriptor($this);
    • 216:        $result $thisClassDescriptor->getSource()->selectModelSet($thisClassDescriptor->getTable());
    • 217:        foreach($this as $column => $value) {
    • 218:            if(isset($this->$column) && in_array($column,$thisClassDescriptor->columns)) {
    • 219:                $result $result->assign($column$value);
    • 220:            }
  • 7
    Model->getModelSet( RecessReflectorClass )
    • called at Line 232 of /var/www/recess/recess/lib/recess/database/orm/Model.class.php

    Called From

    • 228:     *
    • 229:     * @return ModelSet
    • 230:     */
    • 231:    function select() { 
    • 232:        return $this->getModelSet()->useAssignmentsAsConditions(true);
    • 233:    }
    • 234:
    • 235:    /**
    • 236:     * Alias for select.
    • 237:     *
  • 6
    Model->select()
    • called at Line 374 of /var/www/recess/recess/lib/recess/database/orm/Model.class.php

    Called From

    • 370:     *
    • 371:     * @return boolean
    • 372:     */
    • 373:    function exists() {
    • 374:        $result $this->select()->first();
    • 375:        if($result !== false) {
    • 376:            $this->copy($resultfalse);
    • 377:            return true;
    • 378:        } else {
    • 379:            return false;
  • 5
    Model->exists()
    • called at Line 81 of /var/www/recess/recess/lib/recess/apps/tools/controllers/RecessToolsCodeController.class.php

    Called From

    • 77:
    • 78:        $model Library::getClassName($fullyQualifiedClassName);
    • 79:        $reflectorClass = new RecessReflectorClass();
    • 80:        $reflectorClass->name $model;
    • 81:        if(!$reflectorClass->exists()) {
    • 82:            $reflectorClass->fromClass($model$dir);
    • 83:        }
    • 84:        
    • 85:        return $reflectorClass;
    • 86:    }
  • 4
    RecessToolsCodeController->indexClass()
    • called at Line 91 of /var/www/recess/recess/lib/recess/apps/tools/controllers/RecessToolsCodeController.class.php

    Arguments Passed In

    Type Value
    string 'firstApp.models.Post'
    string ''

    Called From

    • 87:    
    • 88:    /** !Route GET, class/$class */
    • 89:    public function classInfo($class) {
    • 90:        $this->checkTables();
    • 91:        $result $this->indexClass($class'');
    • 92:        
    • 93:        if($result === false) {
    • 94:            return new NotFoundResponse($this->request);
    • 95:        }
    • 96:        
  • 2
    ReflectionMethod->invokeArgs( 'firstApp.models.Post', '' )
    • called at Line 171 of /var/www/recess/recess/lib/recess/framework/controllers/Controller.class.php

    Arguments Passed In

    Type Value
    RecessToolsCodeController
    RecessToolsCodeController
    MemberValue
    array
    Array[1]
    KeyValue
    0'firstApp.models.Post'

    Called From

    • 167:            } catch(RecessException $e) {
    • 168:                throw new RecessException('Error calling method "' $methodName '" in "' get_class($this) . '". ' $e->getMessage(), array());
    • 169:            }
    • 170:            
    • 171:            $response $method->invokeArgs($this$callArguments);
    • 172:        } else {
    • 173:            throw new RecessException('Error calling method "' $methodName '" in "' get_class($this) . '". Method does not exist.', array());
    • 174:        }
    • 175:
    • 176:        if(!$response instanceof Response) {
  • 1
    Controller->serve( 'firstApp.models.Post' )
    • called at Line 41 of /var/www/recess/recess/lib/recess/Recess.class.php

    Arguments Passed In

    Type Value
    Request
    Request
    MemberValue
    format'xhtml'
    headers
    Array[9]
    KeyValue
    HOST'127.0.0.1'
    USER_AGENT'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121623 Ubuntu/8.10 (intrepid) Firefox/3.0.5'
    ACCEPT'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    ACCEPT_LANGUAGE'en-us,en;q=0.5'
    ACCEPT_ENCODING'gzip,deflate'
    ACCEPT_CHARSET'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
    KEEP_ALIVE'300'
    CONNECTION'keep-alive'
    REFERER'http://127.0.0.1/recess/recess/apps/FirstAppApplication'
    resource'/recess/code/class/firstApp.models.Post'
    resourceParts
    Array[4]
    KeyValue
    0'recess'
    1'code'
    2'class'
    3'firstApp.models.Post'
    method'GET'
    get
    Array[0]
    post
    Array[0]
    put
    Array[0]
    cookies
    Array[0]
    meta
    Meta
    MemberValue
    app
    RecessToolsApplication
    MemberValue
    codeTemplatesDir'/var/www/recess/recess/lib/recess/apps/tools/templates/'
    name'Recess Tools'
    controllersPrefix'recess.apps.tools.controllers.'
    modelsPrefix'recess.apps.tools.models.'
    viewsDir'/var/www/recess/recess/lib/recess/apps/tools/views/'
    routingPrefix'recess/'
    controllerMethod'classInfo'
    controllerMethodArguments
    Array[1]
    KeyValue
    class'firstApp.models.Post'
    useAssociativeArguments1
    username
    password

    Called From

    • 37:        
    • 38:        // $controller = $pluggedPolicy->getControllerFor($request, $routing);
    • 39:        $controller $pluggedPolicy->getControllerFor($request$apps$routes);
    • 40:        
    • 41:        $response $controller->serve($request);
    • 42:        
    • 43:        $view $pluggedPolicy->getViewFor($response);
    • 44:        
    • 45:        ob_start();
    • 46:        
  • 0
    Recess::main( RecessToolsCodeController, Array )
    • called at Line 22 of /var/www/recess/bootstrap.php

    Arguments Passed In

    Type Value
    Request
    Request
    MemberValue
    format'xhtml'
    headers
    Array[9]
    KeyValue
    HOST'127.0.0.1'
    USER_AGENT'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.5) Gecko/2008121623 Ubuntu/8.10 (intrepid) Firefox/3.0.5'
    ACCEPT'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    ACCEPT_LANGUAGE'en-us,en;q=0.5'
    ACCEPT_ENCODING'gzip,deflate'
    ACCEPT_CHARSET'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
    KEEP_ALIVE'300'
    CONNECTION'keep-alive'
    REFERER'http://127.0.0.1/recess/recess/apps/FirstAppApplication'
    resource'/recess/code/class/firstApp.models.Post'
    resourceParts
    Array[4]
    KeyValue
    0'recess'
    1'code'
    2'class'
    3'firstApp.models.Post'
    method'GET'
    get
    Array[0]
    post
    Array[0]
    put
    Array[0]
    cookies
    Array[0]
    meta
    Meta
    MemberValue
    app
    RecessToolsApplication
    MemberValue
    codeTemplatesDir'/var/www/recess/recess/lib/recess/apps/tools/templates/'
    name'Recess Tools'
    controllersPrefix'recess.apps.tools.controllers.'
    modelsPrefix'recess.apps.tools.models.'
    viewsDir'/var/www/recess/recess/lib/recess/apps/tools/views/'
    routingPrefix'recess/'
    controllerMethod'classInfo'
    controllerMethodArguments
    Array[1]
    KeyValue
    class'firstApp.models.Post'
    useAssociativeArguments1
    username
    password
    DefaultPolicy
    DefaultPolicy
    MemberValue
    array
    Array[3]
    KeyValue
    0
    RecessToolsApplication
    MemberValue
    codeTemplatesDir'/var/www/recess/recess/lib/recess/apps/tools/templates/'
    name'Recess Tools'
    controllersPrefix'recess.apps.tools.controllers.'
    modelsPrefix'recess.apps.tools.models.'
    viewsDir'/var/www/recess/recess/lib/recess/apps/tools/views/'
    routingPrefix'recess/'
    1
    WelcomeApplication
    MemberValue
    name'Welcome to Recess'
    controllersPrefix'welcome.controllers.'
    modelsPrefix'welcome.models.'
    viewsDir'/var/www/recess/apps/welcome/views/'
    routingPrefix'/'
    2
    FirstAppApplication
    MemberValue
    name'My First Recess App'
    controllersPrefix'firstApp.controllers.'
    modelsPrefix'firstApp.models.'
    viewsDir'/var/www/recess/apps/firstApp/views/'
    routingPrefix'firstApp/'
    RtNode
    RtNode
    MemberValue
    array
    Array[0]

    Called From

    • 18:Library::import('recess.http.Environment');
    • 19:Library::import('recess.Recess');
    • 20:
    • 21:// Entry point to Recess!
    • 22:Recess::main(Environment::getRawRequest(), RecessConf::$policyRecessConf::$applicationsRecessConf::getRoutes(), RecessConf::$plugins);
    • 23:
    • 24:// RecessConf follows...
    • 25:
    • 26:abstract class RecessConf {
    • 27: