Open aegidius77 opened 1 year ago
Not enough available disk space to save the datastore.
How much free disk space is available?
Well, 5GB should be enough ... As I said, shaarli 0.12.1 works fine, but not shaarli 0.12.2.
The free disk space check was added in v0.12.2 https://github.com/shaarli/Shaarli/blob/master/application/bookmark/BookmarkIO.php#L169, and it checks that the disk_free_space
function is available before running. However, I found clues that InfinityFree.net might have disabled this function in a way that it always returns 0 (https://forum.infinityfree.net/t/expressionengine-unable-to-update/63826/3).
To double-check this, could you edit application/bookmark/BookmarkIO.php
, and replace return disk_free_space(dirname($this->datastore)) > (strlen($data) + 1024 * 500);
with return PHP_INT_MAX;
return True;
, and tell us if you are able to add bookmarks?
(This is a dirty workaround, but if the server setup lies about how much free space is available, I don't see a proper fix right now)
Hi,
Thank you and sorry for late replying.
I replaced the line you told me about and here is the error message I get :
An unexpected error happened, and the error template could not be displayed.
Return value of Shaarli\Bookmark\BookmarkIO::checkDiskSpace() must be of the type bool, int returned
/home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkIO.php171
#0 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkIO.php(133): Shaarli\Bookmark\BookmarkIO->checkDiskSpace(' #1 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/malkusch/lock/classes/mutex/LockMutex.php(42): Shaarli\Bookmark\BookmarkIO->Shaarli\Bookmark\{closure}()
#2 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkIO.php(155): malkusch\lock\mutex\LockMutex->synchronized(Object(Closure))
#3 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkIO.php(141): Shaarli\Bookmark\BookmarkIO->synchronized(Object(Closure))
#4 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkFileService.php(317): Shaarli\Bookmark\BookmarkIO->write(Object(Shaarli\Bookmark\BookmarkArray))
#5 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkFileService.php(415): Shaarli\Bookmark\BookmarkFileService->save()
#6 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/bookmark/BookmarkFileService.php(87): Shaarli\Bookmark\BookmarkFileService->initialize()
#7 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/container/ContainerBuilder.php(101): Shaarli\Bookmark\BookmarkFileService->__construct(Object(Shaarli\Config\ConfigManager), Object(Shaarli\Plugin\PluginManager), Object(Shaarli\History), Object(malkusch\lock\mutex\FlockMutex), true)
#8 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/pimple/pimple/src/Pimple/Container.php(118): Shaarli\Container\ContainerBuilder->Shaarli\Container\{closure}(Object(Shaarli\Container\ShaarliContainer))
#9 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/Container.php(109): Pimple\Container->offsetGet('bookmarkService')
#10 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/Container.php(164): Slim\Container->get('bookmarkService')
#11 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/container/ContainerBuilder.php(114): Slim\Container->__get('bookmarkService')
#12 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/pimple/pimple/src/Pimple/Container.php(118): Shaarli\Container\ContainerBuilder->Shaarli\Container\{closure}(Object(Shaarli\Container\ShaarliContainer))
#13 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/Container.php(109): Pimple\Container->offsetGet('pageBuilder')
#14 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/Container.php(164): Slim\Container->get('pageBuilder')
#15 /home/vol19_2/epizy.com/.../htdocs/shaarli12/application/front/controller/visitor/ErrorController.php(20): Slim\Container->__get('pageBuilder')
#16 [internal function]: Shaarli\Front\Controller\Visitor\ErrorController->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(TypeError))
#17 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/App.php(728): call_user_func_array(Object(Shaarli\Front\Controller\Visitor\ErrorController), Array)
#18 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/App.php(396): Slim\App->handlePhpError(Object(TypeError), Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /home/vol19_2/epizy.com/.../htdocs/shaarli12/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#20 /home/vol19_2/epizy.com/.../htdocs/shaarli12/index.php(202): Slim\App->run(true)
#21 {main}
Sorry, it should be return True;
instead of return PHP_INT_MAX;
It worked. Thanks.
This is just a workaround, and even though the problem is specific to this shared hosting provider, and to their strange PHP config, we may want to add a way to disable free disk space checking in the configuration (without manually changing application code).
Solution is also available for ouvaton.coop
FYI - got the same issue on my server - changed application/bookmark/BookmarkIO.php as described above and it works again
Hi,
After completing the
Install Shaarli
page, I get theShaarli is now configured. Please login and start shaaring your bookmarks!
page, which is OK. But after trying to log in, I get a error message. Never got this error before when installing shaarli-v0.12.1. Is it a hosting side problem (like PHP version) ? Regardsinstall informations :
error message :