Post by Mountune » Wed Nov 21, 2018 5:20 am

Hello all,

This error (or 3) randomly appeared a week or 2 ago now and has me confused.

Notice: SessionHandler::gc(): ps_files_cleanup_dir: opendir(/tmp/.priv) failed: Permission denied (13) in /shop/system/library/session/native.php on line 29


Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /shop/system/library/session/native.php:29) in /shop/system/library/session.php on line 30


Warning: Cannot modify header information - headers already sent by (output started at /shop/system/library/session/native.php:29) in /shop/system/library/session.php on line 50
Opening the session.php it shows: (Which I have never opened or edited before)
<?php
namespace Session;
class Native extends \SessionHandler {
public function create_sid() {
return parent::create_sid();
}

public function open($path, $name) {
return parent::open($path, $name);
}

public function close() {
return parent::close();
}

public function read($session_id) {
return parent::read($session_id);
}

public function write($session_id, $data) {
return parent::write($session_id, $data);
}

public function destroy($session_id) {
return parent::destroy($session_id);
}

public function gc($maxlifetime) {
return parent::gc($maxlifetime);
}
}

As per the forum rules: (To make it easier to support)
- I am running opencart V2.3.0.2 and using the Simpleone Boxed Theme.
- This appeared after installing the SEO Backpack Extension however the developer looked into this and said it was not conflicting with the extension.
- Website is www.coffeepug.com

This tends to appear backend mainly on the dashboard at the top but also can appear at the top of the main page on the front end and also when testing the checkout it appeared under step 4 delivery method.

The file permissions for the session.php are Owner = Read / Write, Group = None, Public = Read

Do I need to enable Execute permission for the owner? Would this be the reason why?


Any help appreciated. Thanks for your time.

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Wed Nov 21, 2018 5:30 am

also to note I have searched for this and found similar issues on older versions (1.5 etc)but nothing seem to work on v2.3.0.2/

the one that a lot of people had success with was adding "ob_start(); " to the top of any file that had the error however doing this on mine resulted in a FATAL error and the website went down both front and backends.

----------

Another suggested its the session.gc maxlifeline issue in the phpi.ini which default shows 12000000 which is 12,000,000 seconds / 138.88 days by default installation.

It recommended changing to 10800 which is 108,000 seconds / 30 hours.

I could only find this in /shop/admin and the one in /shop was already set lower to 3600 by default.


I am waiting to see if the issue returns after this change.
UPDATE - After looking promising this returned in the admin backend, I have sent an email to my host to see if they can check the session tmp directory is writeable as I believe that could be the issue..

Any help is appreciated

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Thu Nov 22, 2018 12:17 am

there must be someone out there who can quickly help surely?

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by yodapt » Fri Nov 23, 2018 8:22 pm

Check PM

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Mountune » Wed Nov 28, 2018 9:00 pm

I have sent you a message, thanks.

can i ask does anyone know where the default tmp file system is located that opencart uses? or how it detects it? There must be a file someone that shows the location of where the tmp folder is meant to be

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by Mountune » Wed Nov 28, 2018 10:08 pm

So the tmp is located outside of the /shop and could be a local_host (on a shared server) issue that you cant actually see? so my host is messing me around it seems...

anyhow; after reading hours of threads on here with the same issue and no one knowing the fix and also reading google I got this resolved by creating my own tmp session folder and pointing the php.ini to it

the only thing is I do not know if this fix will still use the auto clean for any files after 3600 seconds or would I have to implement that myself?

if anyone knows that would be great.

-----
Opencart Version = v2.3.0.2
Theme = SimpleONE Boxed


Active Member

Posts

Joined
Mon Mar 27, 2017 10:03 pm

Post by boxframes » Tue Dec 04, 2018 11:10 pm

Hi There
I'm having the exact same problems as you, could you please tell me where and how to create a temp file?

Thanks

Newbie

Posts

Joined
Sun Feb 04, 2018 9:37 pm

Post by dragonfly-ie » Fri Dec 21, 2018 8:54 pm

Unless you are running a root server, where you can repair permissions yourself, you should contact your hosting provider and ask them to repair permissions in local_host ../tmp/.priv

This solved my error: ps_files_cleanup_dir: opendir(/tmp/.priv) failed: Permission denied (13)

HTH.

“May the best day of your past be the worst day of your future.”


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am
Location - 52°N 7°37'W
Who is online

Users browsing this forum: No registered users and 32 guests