Sudden error with CMS

9 posts by 2 authors in: Forums > CMS Builder
Last Post: April 12, 2013   (RSS)

By meg - April 12, 2013

I installed a CMS with my client awhile ago. Everything has been working fine. All of a sudden, today, I try to log into the CMS and it gives me this error:

Couldn't start session! 'session_start(): open(/tmp/sess_b6dbc7e04cdfec3b06bb24b0b9aca8b9, O_RDWR) failed: Read-only file system (30)'! Warning: Unknown: open(/tmp/sess_b6dbc7e04cdfec3b06bb24b0b9aca8b9, O_RDWR) failed: Read-only file system (30) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0

What happened? Should I contact their hosting provider? Nothing has been done otherwise. 

By meg - April 12, 2013

ok...it's hacked..

Hi Meg,

Has your hosting provider told you the site is hacked? If you haven't already, I would contact them explaining what the error is, as it looks as if the session directory has been moved or had its permissions changed on the server. 

If you're still able to log into your CMS Admin and running a recent version of CMS Builder, you might be able change the directory that you session data is stored by changing the session.savepath field, and this might fix the issue. You can do this in the General Settings section of the CMS Admin area.

We have a guide that gives you information on how to restore hacked sites, and how to tell if your site has been hacked:

http://www.interactivetools.com/docs/cmsbuilder/how_to_restore_hacked_sites.html

Let me know if you have any questions.

Thanks

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By meg - April 12, 2013

Yes, the website has been hacked. Since I already had a backup of the CMS, I just deleted the entire directory and re-uploaded it to a new directory, but it's still giving me the same error. Should I contact them again? What should I instruct them to do?

Hi Meg,

I think this might be a server error. Could you create a file called test.php on your server and add this code:

<?php
// page1.php

error_reporting(E_ALL);
ini_set('display_errors', '1');

session_start();

echo 'Session started #1<br>';

$_SESSION['favcolor'] = 'green';
$_SESSION['animal']   = 'cat';
$_SESSION['time']     = time();

echo 'script complete';

Then view the page in a browser and see if you get the same error?

If you do get the same error I would send your hosting company a link to the file so that they can see this is a server session configuration issue. 

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By meg - April 12, 2013

This is the error I received when I uploaded the test.php file. 

Warning: session_start() [function.session-start]: open(/tmp/sess_a456b0a5731b4bbc9c2f3cb6260002ed, O_RDWR) failed: Read-only file system (30) in /home/p26h9t2p/public_html/test.php on line 7

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/p26h9t2p/public_html/test.php:7) in/home/p26h9t2p/public_html/test.php on line 7

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/p26h9t2p/public_html/test.php:7) in/home/p26h9t2p/public_html/test.php on line 7
Session started #1
script complete
Warning: Unknown: open(/tmp/sess_a456b0a5731b4bbc9c2f3cb6260002ed, O_RDWR) failed: Read-only file system (30) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0

Hi Meg, 

Thanks for testing out that script for me. This is the error I expected to be returned, and shows that this is a server configuration error. 

I got the code for the test script from the PHP manual: http://php.net/manual/en/function.session-start.php so its all standard PHP code and doesn't connect to/use CMS Builder. 

A session is what PHP uses to store variables for individual users on a site (for example to store a users name, or if they have logged into a site). But this server isn't able to access the directory where this information is stored.

If you contact your hosting company and given them a link to the test.php script, and tell them that sessions aren't set up correctly on the server.

Thanks

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By meg - April 12, 2013

Thanks so much! I just notified them and provided the test.php as a reference for them.