I am using Phalcon and MySQL. Upon logging in I received an error like this,
Meta-Data directory cannot be written
#0 [internal function]: Phalcon\Mvc\Model\MetaData\Files->write('map-map\\models\\...', Array)
#1 [internal function]: Phalcon\Mvc\Model\MetaData->_initialize(Object(Map\Models\Users), NULL, NULL, NULL)
#2 [internal function]: Phalcon\Mvc\Model\MetaData->readColumnMapIndex(Object(Map\Models\Users), 1)
#3 [internal function]: Phalcon\Mvc\Model\MetaData->getReverseColumnMap(Object(Map\Models\Users))
#4 [internal function]: Phalcon\Mvc\Model::_invokeFinder('findFirstByUser...', Array)
#5 /var/www/html/app_map_system/app/library/Auth/Auth.php(27): Phalcon\Mvc\Model::__callStatic('findFirstByUser...', Array)
#6 /var/www/html/app_map_system/app/library/Auth/Auth.php(27): Map\Models\Users::findFirstByUsername('admin@admin.com')
#7 /var/www/html/app_map_system/app/controllers/IndexController.php(44): Map\Auth\Auth->check(Array)
#8 [internal function]: Map\Controllers\IndexController->loginAction()
#9 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(Map\Controllers\IndexController), 'loginAction', Array)
#10 [internal function]: Phalcon\Dispatcher->dispatch()
#11 /var/www/html/app_map_system/public/index.php(41): Phalcon\Mvc\Application->handle()
#12 {main}
I have given access www-data as well as my user to /var/www/ directory using this command,
sudo chown -R www-data:www-data /var/www/
but still getting the same error. Anyone who encountered the same issue? Any help would be appreciated.