samihsoylu / journal

Journal is a privacy first, self hosted digital log book. It is designed to be accessible anywhere you go, allowing you to organize your thoughts, feelings and opinions in one place.
GNU General Public License v3.0
66 stars 5 forks source link

Errors when attempting to create entry #20

Closed brianlmoon closed 2 years ago

brianlmoon commented 2 years ago

I am seeing the following error when trying to go to the /entry/create and /template URLs.

 Fatal error: require(): Failed opening required '/var/www/private/cache/database/proxy/__CG__AppDatabaseModelCategory.php'
(include_path='.:/usr/share/php') in /var/www/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 187

I can create categories and users. I checked and that directory is empty. I am not sure what is supposed to create that file. I even deleted everything and did the full reinstall again. Same error.

samihsoylu commented 2 years ago

Hi @brianlmoon

This is very odd that you have issues out of the box. Sorry that you're experiencing this. Do you know if you have your write permissions configured correctly to the private/cache/ directory?

From the command line can you please try the following:

# Set file and directory permissions
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
find private/cache -type d -exec chmod 0777 {} \;
chmod +x vendor/bin/*
chmod +x bin/*

# Regenerate proxy classes and clear meta cache
vendor/bin/doctrine orm:generate-proxies
vendor/bin/doctrine orm:clear-cache:metadata
brianlmoon commented 2 years ago

That got everything working. The permissions on private/cache directory were fine. The proxies just didn't get generated for some reason.

samihsoylu commented 2 years ago

I am glad to hear that regenerating the proxies worked out well.

Pull request #21 includes a fix that will prevent the need to regenerate proxies all together. For now, I have updated the documentation to include generating the proxies as a step in the installation.

The pull request will be merged soon.