YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.74k stars 749 forks source link

/cache/vtlib/HTML not writable, please chmod to 777 in /vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 #12567

Closed ozinfotech closed 4 years ago

ozinfotech commented 4 years ago

I'm attempting a first-time install of YetiForceCRM. I downloaded the complete zip package via wget and unzipped it directly on the server. When I went to browse to the home page, all I got was a 500 server error. The sanitized server logs are the following: `[11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Warning: SessionHandler::read(): open(/home/mydomain.org/cache/session/sess_f45f4979a2cb2802954810e9ac0416d4, O_RDWR) failed: Permission denied (13) in /home/mydomain.org/app/Session.php on line 34 [11-Feb-2020 16:58:59 UTC] PHP Warning: session_start(): Failed to read session data: user (path: /home/mydomain.org/cache/session) in /home/mydomain.org/app/Session.php on line 34 [11-Feb-2020 16:58:59 UTC] PHP Fatal error: Uncaught --> Smarty: unable to write file /home/mydomain.org/cache/templates_c/wrt5e42dd53221f88_64762090 <-- thrown in /home/mydomain.org/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php on line 60 [11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Warning: Directory /home/mydomain.org/cache/vtlib/HTML not writable, please chmod to 777 in /home/mydomain.org/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php on line 297 [11-Feb-2020 16:58:59 UTC] PHP Fatal error: Uncaught Exception: The zip library is missing in /home/mydomain.org/include/RequirementsValidation.php:15 Stack trace:

0 /home/mydomain.org/install/Install.php(21): include_once()

1 {main}

thrown in /home/mydomain.org/include/RequirementsValidation.php on line 15 `

ozinfotech commented 4 years ago

After looking around, I noticed there is no /vendor/ezyang/htmlpurifier/DefinitionCache folder.

ozinfotech commented 4 years ago

Found it! It is in the /vendor/ezyang/htmlpurifier/library/HTMLPurifier folder.

vovpff commented 4 years ago

You need to change user rights to 777 to all ezyang folder. This is written in error message

ozinfotech commented 4 years ago

Changing the entire folder to 777 doesn't make sense from a security standpoint. Are you sure this is the correct response? If so, I may not use the program as I don't need folders and files world-writeable.

mariuszkrzaczkowski commented 4 years ago

you have a problem with file permissions. check if the file owner is valid, e.g. apache or www-data

ozinfotech commented 4 years ago

The owner and group are the same web user that handles other web sites, without problems, on the same VPS. Just to be sure, I did a recursive chown on the folder and files but I'm still getting the same error. I can see a .SER file created in the /cache/vtlib/HTML folder, so I'm not sure why it is saying it doesn't have write permissions.

ozinfotech commented 4 years ago

I just turned on error reporting and found this now:

Fatal error: Uncaught Exception: The zip library is missing in /home/mydomain.org/include/RequirementsValidation.php:15 Stack trace: #0 /home/mydomain.org/install/Install.php(21): include_once() #1 {main} thrown in /home/mydomain.org/include/RequirementsValidation.php on line 15

ozinfotech commented 4 years ago

PHPinfo shows '--enable-zip=shared' in Configure Command section. The only archive support I don't see enabled is bzip2 compression.

mariuszkrzaczkowski commented 4 years ago

Don't look at it, see if the extension is loaded in phpinfo.

mariuszkrzaczkowski commented 4 years ago

What source did you download from?

ozinfotech commented 4 years ago

All right. Found the PHP section and am working through some of the packages there. I'll let you know if there is any more problems.

ozinfotech commented 4 years ago

What source did you download from?

I got it from GitHub here by following these instructions.

At first I had the wrong owner on the files and folders, so thanks for the heads up on that. It looked like I was just missing quite a few extensions too in PHP. Those have all been resolved.

Thanks for your help!

aneetkukreja1 commented 2 years ago

Actually it's not permissions issue. It's files ownership issue. Change vendor directory or htmlpurifier directory (with files) ownership to the suitable system user. It worked for me.

mariuszkrzaczkowski commented 2 years ago

https://yetiforce.com/en/knowledge-base/documentation/implementer-documentation/item/web-server-requirements#WebServer

nomaniflair commented 6 months ago

i am also facing the same issue but it will solve by update the updating composer command : composer update

i hope it will will work for you.