Drupal site issue - drupal-9

I have setup a Drupal 9 site on CentOS Linux Server, All permissions are on place, even i have tried 777 Permissions as well but no luck with it.
I am getting the following errors on loading the site.
Drupal\Component\PhpStorage\FileStorage->createDirectory('sites/default/files/php/twig', 511) (Line: 73)
Drupal\Component\PhpStorage\FileStorage->ensureDirectory('sites/default/files/php/twig') (Line: 66)
Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save('60a33rwes432_views-view.html.twig_nvxJimhcnulevdX8J3BYUfwescwe4XBK', '<?php

Related

LAMP Error on AWS: Error writing server configuration file ".htaccess"

I'm setting up a silverstripe(4) project using LAMP with AWS and I am new to the programming world.
I'm having trouble with after entering the php dev/build.
This error comes up:
error-log.ERROR: Uncaught Exception Exception: "Error writing server configuration file ".htaccess"" at /var/www/alsoherdaughter/vendor/silverstripe/assets/src/Flysystem/AssetAdapter.php line 157 {"exception":"[object] (Exception(code: 0): Error writing server configuration file \".htaccess\" at /var/www/alsoherdaughter/vendor/silverstripe/assets/src/Flysystem/AssetAdapter.php:157)"}
Not sure what I have done wrong. I have looked about for information/resolutions but not having much luck.
You should be able to (temporarily at least) solve any permission issue with:
chmod 777 /var/www/alsoherdaughter/ -R
(in a Linux terminal)
I mentioned temporarily. If you don't have ownership to the items at hand, it's possible the above chmod will be overwritten again by some other process operating by someone else.
You might be able to permanently solve it with:
chown /var/www/alsoherdaughter/ YOUR_USERNAME_HERE

How to fix chmod errors when updating wordpress theme?

I recently upgraded from php 5 to 7.2 and my wp site didnt work, service temporarily unavailable error. So I logged into the backend and WP 5.4 was telling me I needed to check security issues of which I resolved 2 of 3 automatically but 1 could not which is "restrict access to files and folders". So I tried to update the 2017 theme and when I do so I get a bunch of these(although its the same error):
Selected items were updated with errors:
- Unable to update theme 'twentyseventeen_1.7_1_', details: PHP Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
PHP Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168...
and near the end it reads:
Warning: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions. "front-page.php, rtl.css, 404.php...
Then in the end it doesnt update of course. A suggestion by the Wordpress Toolkit on plesk is:
Im using filezilla and changing the permissions to those files but I get "operation not permitted".
[SOLVED] (at least for me)
Me too on Cloudways and Digital Ocean.
Just restart the server and error is gone.

How to fix 'Uncaught PHP Exception Twig_Error_Loader: Unable to find template' on Symfony 3.4?

I deployed a symfony 3.4 project from my local machine (Windows 10) to a cloud server (Digital Ocean) based on Ubuntu.
I spent 2 days trying to resolve this (i think) routing problem:
"request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader..."
Locally, on localhost with XAMPP, it works perfect.
The project runs ok on the login (is like a backend user app), with the register ok But when it tries to pass the login, it needs to load the initial dashboard with some includes (like nav_side.html.twig) and the server response is error 500.
How can i fix it?
Thanks a lot for your response...i'm a little bit desperate. :)
I made composer update, i deleted the cache folder, but the error is still there.
request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to
find template "Backe ndBundle:includes:nav_side.html.twig"
(looked into: /var/www/onecup/app/Resources/views,
/var/www/onecup/vendor/s
ymfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in
"BackendBundle:Dashboard:index.html.twig" at line 7." at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line
234 {"exception":"[object] (Twig_Err or_Loader(code: 0):
Unable to find template \"BackendBundle:includes:nav_side.html.twig\"
(looked into: /var/www/ onecup/app/Resources/views,
/var/www/onecup/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form)
in \"BackendBundle:Dashboard:index.html.twig\" at line 7. at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Fil
esystem.php:234)"} []
#Flying was right: examine your code and try to find possible case inconsistences in directory / filenames. e.g. "file" and "File". Windows filesystem is case-insensitive, but Ubuntu filesystem is case-sensitive.
So, i changed the Includes to includes and that's all.
Thanks a lot!! :)

wordpress site error after using virus scanner from Cpanel

I scanned my website virus from cpanel virus scanner and its scanned some viruses is /logs folder and some in /mail/... folders some mails
I deleted those destroy all those mails and quarantined one file from /logs follder after that my site is not accessing
here is the error
Fatal error: Uncaught Error: Call to undefined function ts_theme_favicon() in /home/worldlink/public_html/wp-content/themes/gon/header.php:17 Stack trace: #0 /home/worldlink/public_html/wp-includes/template.php(688): require_once() #1 /home/worldlink/public_html/wp-includes/template.php(647): load_template('/home/worldlink/...', true) #2 /home/worldlink/public_html/wp-includes/general-template.php(41): locate_template(Array, true) #3 /home/worldlink/public_html/wp-content/themes/gon/page.php(3): get_header('') #4 /home/worldlink/public_html/wp-includes/template-loader.php(74): include('/home/worldlink/...') #5 /home/worldlink/public_html/wp-blog-header.php(19): require_once('/home/worldlink/...') #6 /home/worldlink/public_html/index.php(17): require('/home/worldlink/...') #7 {main} thrown in /home/worldlink/public_html/wp-content/themes/gon/header.php on line 17
When you see errors with the WordPress core, such as:
/home/worldlink/public_html/wp-includes/template-loader.php
it's time to reinstall WordPress. It's likely there is malicious code in the core files they was referencing one of the files you deleted, and that's why you're suddenly getting errors.
I've found WordFence to be a brilliant plugin for scanning all the files that make up your website (core, theme and plugins) and identifying exactly which files have been compromised.
In the error you reported, your theme is giving errors as well:
/home/worldlink/public_html/wp-content/themes/gon/header.php
Try switching to another theme and seeing if that resolves the issue.

[an error occurred while processing this directive]

Hey guys I'm in the middle of migrating a wordpress site from one host to another (BlueHost to LunarPages). I backed up everything on the old server, did a fresh WP install on the new server, imported the old files over, did the wp-config/database changes and got the site to show up.
http://www.albertineco.com
But if you navigate to any page it gives you [an error occurred while processing this directive]. I've tried deactivating my plugins and switching themes to see if that caused it with no luck. LunarPages didn't have a real idea of the cause of the problem either.
This was in the Cpanel error log:
[Fri Mar 22 10:57:32 2013] [error] [client 69.178.136.2] invalid CGI ref "/cgi-sys/fourohfour.cgi" in /home/alber27/public_html/404.shtml, referer: http://albertineco.com/
Any thoughts guys?
I had the same problem. This is how I solved:
I asked the hosting company to provide me the FTP credentials
I logged in to FTP and right clicked .htaccess file
I changed the cmod for .htaccess file to 777
I went back to my dashboard and re-did the permalink and saved.
Now, it works.

Resources