Jump to content

TonyK

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by TonyK

  1. That makes sense - I will do as you say. Thank you so much! Best, Tony
  2. Hi Gizmola, Thank you for the in-depth answer. Yes, Mautic is a Symfony app and yes, it seems to be an ownership problem. I installed Mautic using Softaculous - at first it ran OK and after some configuration work that is part of the app it stopped and produced an error page and in checking the error log the recorded error messages were all like the following one: [2020-03-22 14:30:05] mautic.WARNING: PHP Warning - require(/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php): failed to open stream: No such file or directory - in file /home/bestback/public_html/mautic/vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php - at line 209 {"className":"Mautic\\CategoryBundle\\Entity\\Category","classMetadata":"[object] (Doctrine\\ORM\\Mapping\\ClassMetadata: Doctrine\\ORM\\Mapping\\ClassMetadataInfo@000000002f452922000000005b9391a3)","proxyClassName":"Proxies\\__CG__\\Mautic\\CategoryBundle\\Entity\\Category","fileName":"/home/bestback/public_html/mautic/app/cache/prod/doctrine/orm/Proxies/__CG__MauticCategoryBundleEntityCategory.php"} [] I am working on that problem since and all I found were the CLI commands that should correct the problem. Several posts indicated that this error message indicates a ownership problem. The app Mautic is trying to access files as a different user than the OS user. Perhaps, you have an idea which commands to use in order to correct that problem: So that OS user = Mautic user = Directory/Files owner If that is the solution I would not need all the other code and I could make use of your other advice Again, thank you so much for your help! Stay well! Best, Tony
  3. Hi, I am trying to create a PHP script ("repair-correct.php") in order to run some CLI commands without using PuTTy - The CLI commands are needed to repair/correct the execution of a web application named Mautic. Shared web host account with PHP 7.0 URL: https://www.myserver.com Mautic directory: https://www.myserver.com/mautic What I want to do is: Step1: Change ownership of files and folders The files and folders could be owned by the wrong user. Thus I continue to experience errors even with the correct file and folder permissions. This is because the user may not have the permission (as they are not the owner of the files/folders) that is required. To find out which user Apache is running as, I want to execute the following command and take note of the first entry in the line which is returned: ps aux | grep apache2 I want to use this information to find the groups with the following command groups apache_user (where apache_user is the user I identified from the first step above) To reset the ownership of files and folders, I want to use the following command (ensuring that I replace apache_user and apache_group with the values identified in the steps above): sudo chown -R apache_user:apache_group With this command I want to change ownership, using the -R flag which means recursively - including all files/folders within that location. Step 2: Reset the file and folder permissions Some of the file and folder permissions are incorrect, I want to run the following commands to reset them find . -type f -not -perm 644 -exec chmod 644 {} + find . -type d -not -perm 644 -exec chmod 755 {} + chmod -R g+w app/cache/ app/logs/ app/config/ chmod -R g+w media/files/ media/images/ translations/ rm -rf app/cache/* Thanks so much for your help in solving this problem! Best, Tony
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.