Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: PHP error accessing session_start

Status Resolved
Add-on / Version Custom System Messages 2.5
Severity
EE Version 2.90

Tim Print

Jun 03, 2015

Description:

Uses Focus labs config set-up.

I have just moved the site to the live server here http://www.jpm-insurance.co.uk/ Local is working fine.

This error is at the top of the page on the front-end and CP:
A PHP Error was encountered
Severity: Warning
Message: session_start(): open(/tmp/0/p/4/sess_0p4pkid2s17pmt5gdcn65penb7, O_RDWR) failed: No such file or directory (2)
Filename: system_messages/ext.system_messages.php
Line Number: 156

It seems to be blocking some other things from loading. For instance typekit isn’t loading the fonts.

If I disable Custom System Messages it all seems to work OK.

It is on shared hosting with http://www.claranet.co.uk/ which wasn’t my choice and for which I don’t have much control.

I’m guessing there is a path or permission incorrect but I’m not sure exactly what.

Any advice would be appreciated.

#1

BoldMinded (Brian)

Hi, Tim. That sounds to me more like an issue with the server configuration. I’ve never seen an error report like this for CSM and its been in the wild for 4 years, and given that it only throws that error on that server reinforces my hunch. Try contacting your hosting provider to see why PHP can’t read from the tmp directory.

#2

Tim Print

Thanks. I have spoken to the hosting company first but they basically told me it’s not our problem it’s your code. Really helpful…

Can you tell me where that tmp directory should be , I’m not sure where I should be looking?

#3

BoldMinded (Brian)

Who is your hosting provider? I don’t want to throw the ball back over the fence, but PHP writing to and modifying the /tmp directory is very common. Its where all session data is usually stored, hence the error when session_start is trying to get called. Its only pointing to the system_messages.php file b/c that is the line in which session_start can’t access the file on the file system… there isn’t anything I can change to fix that. You can try adding an @ to the beginning of that line though, so it looks like @session_start(). That will suppress minor PHP errors, but this is a warning, so it might not work. Suppressing the error doesn’t actually fix the problem though.

#4

BoldMinded (Brian)

To answer your question, the /tmp directory should always be in /tmp, at the root of the server.

#5

BoldMinded (Brian)

Tim, add this to your EE config.php file:

echo session_save_path();
die;

Then load a page and see what the path is.

#6

Tim Print

Host is Claranet http://www.claranetsoho.co.uk/

If I do echo session_save_path(); die; and load a page I get:

3;/tmp

Directory structure is: /config /public /www /admin.php /index.php /assets /themes /tmp /system

/third_party

Thanks again for trying to help with this.

#7

BoldMinded (Brian)

Is it a shared host? Looks to me like the /tmp directory may not even be accessible from your code. You should contact the host again, I’m pretty sure it is an issue on their side.

#8

Tim Print

It is shared and I’m not that impressed. It’s out of my control and client is reluctant to move for whatever reason. I’m going to keep chasing them on this and set up some tests.

I’ll let you know here when I have an outcome. Thanks for your help.

#9

BoldMinded (Brian)

Tim, any updates on this?

#10

Tim Print

Only that I’m even more sure it is a server issue, I set up a new development server which is working fine and my local version is too. I’ve currently turned CSM off.

The client is looking at moving hosts as apparently there are some other issues. I’m sub-contracting through another agency so everything is a bit slow.

I don’t think there is anything more you can do so if you want to mark this as closed please do. Thanks for your help.

#11

BoldMinded (Brian)

Glad you’re on the right track. Good luck with the hosting issue.

Login to reply