正文
whmcs更新报错:Cannot create cache directory /home/www/.composer/cache/repo/https—releases.whmcs.com-v2/
whmcs更新报错:Cannot create cache directory /home/www/.composer/cache/repo/https—releases.whmcs.com-v2/
今天打算写一些whmcs相关的教程,然后看了下我的程序版本挺老了,所以想更新下。
我是在后台直接点击顶部的更新来更新的。
更新时发现更新不了,报出了错误。
详细报错如下:
Cannot create cache directory /home/www/.composer/cache/repo/https---releases.whmcs.com-v2/, or directory is not writable. Proceeding without cache Cannot create cache directory /home/www/.composer/cache/files/, or directory is not writable. Proceeding without cache [ErrorException] is_dir(): open_basedir restriction in effect. File(/home/www/.composer) is not within the allowed path(s): (/www/wwwroot/www.skloong.com/:/tmp/:/proc/) update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] []...
解决办法:
这个报错意思是无法创建/home/www/.composer/cache/repo/https—releases.whmcs.com-v2/这个缓存目录,当时我以为是宝塔防跨站攻击开启的问题,关闭了发现还不行。然后就去看了下目录权限,发现/home/www/这个目录的权限是700,大致就猜到问题了。将目录改为777权限,用户组还是原来的www。
破解版更新后许可授权会失效。把License.php重新覆盖一次就可以了。