xiebruce / PicUploader

一个还不错的图床工具,支持Mac/Win/Linux服务器、支持压缩后上传、添加图片或文字水印、多文件同时上传、同时上传到多个云、右击任意文件上传、快捷键上传剪贴板截图、Web版上传、支持作为Mweb/Typora发布图片接口、作为PicGo/ShareX/uPic等的自定义图床,支持在服务器上部署作为图床接口,支持上传任意格式文件。
https://www.xiebruce.top/17.html
MIT License
1.19k stars 169 forks source link

Mac自动操作异常 #11

Closed yintianyu closed 5 years ago

yintianyu commented 5 years ago

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 14 unable to open database file in /Users/yintianyu/code/Github/PicUploader/settings/DbModel.php:101 Stack trace:

0 /Users/yintianyu/code/Github/PicUploader/settings/DbModel.php(101): PDO->exec('INSERT INTO `hi...')

1 /Users/yintianyu/code/Github/PicUploader/settings/HistoryModel.php(33): settings\DbModel->execute('INSERT INTO `hi...')

2 /Users/yintianyu/code/Github/PicUploader/settings/HistoryController.php(33): settings\HistoryModel->createOne(Array)

3 /Users/yintianyu/code/Github/PicUploader/uploader/Upload.php(141): settings\HistoryController->Add('IMG_88F82B209BE...', 'http://pictures...', 375285)

4 /Users/yintianyu/code/Github/PicUploader/index.php(105): uploader\Upload->getPublickLink(Array)

5 {main}

thrown in /Users/yintianyu/code/Github/PicUploader/settings/DbModel.php on line 101

xiebruce commented 5 years ago

你检查一下PicUploaer整个文件夹的所有者和所属组,要求设置为:Mac用户名:staff,“Mac用户名”获取方法——在终端上输入“whoami”,回车即可!比如你的Mac用户名是yintianyu,那么设置所有者和所属组的命令为:

先进入PicUploader所在目录:

cd /Users/yintianyu/code/Github

然后设置PicUploader的所有者和所属组:

sudo chown -R yintianyu:staff ./PicUploader
yintianyu commented 5 years ago

你检查一下PicUploaer整个文件夹的所有者和所属组,要求设置为:Mac用户名:staff,“Mac用户名”获取方法——在终端上输入“whoami”,回车即可!比如你的Mac用户名是yintianyu,那么设置所有者和所属组的命令为:

先进入PicUploader所在目录:

cd /Users/yintianyu/code/Github

然后设置PicUploader的所有者和所属组:

sudo chown -R yintianyu:staff ./PicUploader

是有两个目录的所属是root,改过来就好了

xiebruce commented 5 years ago

@yintianyu 嗯嗯,好了就好,好用的话给个star呀!