Orocommerce installed. But Symfony Permission denied, Failed to read session data - symfony

After installed orocommerce, i input the URL and want to visit my domain, then error occurred.
Warning: SessionHandler::read(): open(/www/wwwroot/mydomain.com/var/sessions/prod/sess_u8756ela11vqu4ihcokmklo9b8, O_RDWR) failed: Permission denied (13) in /www/wwwroot/mydomain.com/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php on line 49
Warning: session_start(): Failed to read session data: user (path: /www/wwwroot/mydomain.com/var/sessions/prod) in /www/wwwroot/mydomain.com/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 149
**StrictSessionHandler.php on line 49 is**
return $this->handler->read($sessionId);
**NativeSessionStorage.php on line 149 is**
if (!session_start()) {
throw new \RuntimeException('Failed to start the session.');
}
can anybody help me?

"Permission denied" means the webserver has no access to the sessions folder.
You have to set up permissions properly or change the user used for the webserver.

Related

wordpress Error establishing a database connection, the page can not display

I am very new to Wordpress. I uploaded data to cpanel, but when I tried to borrows the link to display the website I get this message when I look at the error log.
Error establishing a database connection
There were the below two error messages. I hope somebody can help me.
PHP Warning: require(/home/.../public_html/wp-includes/load.php): failed to open stream: No such file or directory in /home/.../public_html/wp-settings.php on line 19
PHP Fatal error: require(): Failed opening required '/home/.../public_html/wp-includes/load.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home/.../public_html/wp-settings.php on line 19
Most likely you have a bad (incomplete) file upload.
Try to upload again your Wordpress installation.

vichuploader cannot update file in production

I'm using vichuploader for storing avatars. Eveyrhing is working fine on my local server but during file update in production server throw such error:
request.CRITICAL: Uncaught PHP Exception Symfony\Component\HttpFoundation\File\Exception\FileException: "Unable to create the "kernel.root_dir/../image/avatar/4" directory" at /home/xxx/xxxx.com/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php line 110 {"exception":"[object] (Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException(code: 0): Unable to create the \"kernel.root_dir/../image/avatar/4\" directory at /home/xxx/xxx.com/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/File.php:110)"} []
I use symfony 3 on OVH shared hosting, does anyone have idea what is wrong?
You have not permission to create files in directory /image/avatar

Error shown while taking backup installation on loaclhost in prestashop

Error shown while taking backup installation on loaclhost in prestashop.... Please help in resolving this error.
show this message:-
Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'aranyc68_aranyas'#'localhost' (using password: YES)
First check whether you have db permissions for the user: 'aranyc68_aranyas',
if you have permission check the following :
Go to config folder of your prestashop project and open settings.inc.php and check the following
define('_DB_SERVER_', 'yourdbserver');
define('_DB_NAME_', 'yourdbname');
define('_DB_USER_', 'yourdbuser');
define('_DB_PASSWD_', 'yourdbuserpwd');

Permission Denied in Sublimetext3 unix

I downloaded Sublimetext3, and tried saving a file and received "Error: Permission denied". I tried changing the Sharing and Permissions access and continue to receive the same error.
How do I fix this issue?

I can't upload files after migrating a Drupal site to a new server

We have a content type with two imagefield / filefield fields, and after migrating our site to a new server, we have the following problem:
When we submit a new item for this content type, with two images for those fields, drupal gives us the following error and does not upload the images:
warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. An image thumbnail was
not able to be created. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. warning:
fopen(sites/default/files/.htaccess)
[function.fopen]: failed to open
stream: Permission denied in
/websites/sitename/data/sites/all/modules/filefield/field_file.inc
on line 349. An image thumbnail was
not able to be created.
I understand this is a permissions error, but it is not clear to me where do I have to change permissions.
Line 349 of file.inc has the following code:
if (($fp = fopen("$directory/.htaccess", 'w')) && fputs($fp, $htaccess_lines)) {
fclose($fp);
chmod($directory .'/.htaccess', 0664);
}
else {
$repl = array('%directory' => $directory, '!htaccess' => nl2br(check_plain($htaccess_lines)));
form_set_error($form_item, t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines:<br /><code>!htaccess</code>", $repl));
*EDIT: Solved, The issue was that for some reason drupal needed write permissions in the sites/default/files folder to create a .htaccess file.
The code in file.inc wants to update/create the .htaccess file in the files directory ('sites/default/files' in your case). That it fails could mean that your web server process' do not have write permissions in the files directory at all (unlikely, as this would give more prominent errors in the backend), or that there already exists a .htaccess file in that directory which is set to read only (more likely, could have happened on migration and can easily be overlooked, as the file is hidden by default).

Resources