PHP Fatal Error: Uncaught Exception 'RuntimeException' with message 'Unable to create the store directory #16
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Environment
c9fee1ea42
Description
After a successful install with no errors, and the DocumentRoot pointing to the correct directory, I am seeing these in my Apache's error logs:
The web page itself doesn't load an error message, simply a white screen.
Hello,
Is the web server allowed to create the directory
/home/admin/web/gist.test.dev/public_html/gist/cache
and write into?Create the directory
/home/admin/web/gist.test.dev/public_html/gist/cache
and allow the webserver to create files and directories into.Simon
Yes permissions and ownership is all correctly set on all directories and files. The cache directory was already present, but I went ahead and deleted it, recreated it, applied the appropriate permissions/ownership once again, and I'm still experiencing the same issue.
Can you create
web/test.php
with this content:What's the result after browsing the page (http://your-gist-domain/test.php)?
PHP file contents:
Page Results:
drwxr-xr-x 9 root root 311 Jul 10 16:14 .
means thatadmin
is not allowed to create the directorycache
directly below/home/admin/web/gist.test.dev/public_html/gist/
.You could try 2 different things:
root@server # chgrp admin /home/admin/web/gist.test.dev/public_html/gist/ && chmod g+w /home/admin/web/gist.test.dev/public_html/gist/
root@server # mkdir /home/admin/web/gist.test.dev/public_html/gist/cache && chown admin:admin /home/admin/web/gist.test.dev/public_html/gist/
Thank you for pointing that out. That was a very obvious oversight on my part so my apologies.
I unfortunately have a new problem however, and I feel like it may have something to do with the
DocumentRoot
possibly. Currently, Apache uses the/web
directory as the DocumentRoot. This is confirmed as navigating to the site, it reads the index page and shows some of the page. Unfortunately, a lot of the scripts and assets are not being found. In the Apache logs they show404
. Additionally on the actual index page, it shows the following error:Here is an image.
I know configuring the VirtualHost in the Apache configuration is the most ideal way to set the DocumentRoot, but in this particular use case it's not possible. That said, I'm using an
.htaccess
file to accomplish this. Here are its contents:Any ideas on this one? Sorry for so many questions.
If the DocumentRoot is
web
, the the home page is/
instead of/gist
. That's why you have a 404 error. So ifhttp://gist.test.dev/
equals/home/admin/web/gist.test.dev/public_html/gist/web/
usingDocumentRoot /home/admin/web/gist.test.dev/public_html/gist/web/
, then use the given.htaccess
(https://gitnet.fr/deblan/gist/src/branch/master/web/.htaccess).But if
http://gist.test.dev/
equals/home/admin/web/gist.test.dev/public_html/gist/
usingDocumentRoot /home/admin/web/gist.test.dev/public_html/gist/
and if you want to perform a fakeDocumentRoot /home/admin/web/gist.test.dev/public_html/gist/web/
using your htaccess, you gonna have security issue because of accessible directories like/app
.Alright. At this point it appears it's not an issue with the application, moreso my server's configuration. Thank you for helping me out thus far! I'll go ahead and close out this issue.
You're welcome!