I have no ideal what happen to my databases all of a sudden they stopped working.

What I can tell is the problem is in the header, actually I am not sure if it my hosting company who caused the problem because they did an upgrade to their server I think a couple days ago and now nothing works. Before I scream at them I thought I might ask someone here if you knew what the problem is.

OK back to the header the error I get is this:

Warning: session_start(): open(/tmp/sess_390089ed4b86819ce69a881e681f4334, O_RDWR) failed: Read-only file system (30) in /hsphere/local/home/lwilliam/lawfour.com/database/Demoadd.php on line 1

I don't want to post all of the errors here if you need to see them go here http://www.jci.tju.edu/~lwilliam/demo.html the error goes down to line 8 where the headers are.


This is to top of my php page:

<?php session_start(); ?>
<?php ob_start(); ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>

Now when I delete the header and session the page loads ok with no error until I try to submit something then the header error comes up and that is because within the code their is another header that redirects to another page.

header("Location: demolist.php");

Does anyone knows what this means and if it can be fix.

thanks

Warning: session_start(): open(/tmp/sess_390089ed4b86819ce69a881e681f4334, O_RDWR) failed: Read-only file system (30) in /hsphere/local/home/lwilliam/lawfour.com/database/Demoadd.php on line 1

I do not think there is any ambiguity in the error message above. Seems clear the problem is your host has tmp dir for your account set to /tmp/, and that the dir is not allowing your app to write to that dir. Your host either needs to configure your tmp dir setting to a dir that you have write privs to, or give you write privs to /tmp/.

You can ignore all the header errors. Those are simply caused by the session warning being sent to the browser. Once output is sent, you can't modify the headers. Not you fault--that session problem needs to be fixed.

Thanks I panic big time I put a lot of work in the databases I created, but I think i better buy some books to read up on things.

Thanks

Books may help you, if you've found reading about technology and languages has helped you in the past. As for me, I can read about programming all day long and get very little value. I've never read a PHP or MySQL book. I just do. It just takes years of doing and struggling and being active in great programmer communities like we have here at Daniweb.

For example, the first time I had the error you show in this thread, I probably Google'd "Warning: session_start():" and "read only" to find forum posts regarding the issue. That led me to the next step. At every roadblock, I just keep searching for an answer to that ONE step. (Baby steps.) Sometimes I do not find the answer to the issue, but learn an entirely different approach to my situation--making the original problem obsolete. "Think outside of the box." or "There is no box."

For example, you could "think outside the box" on your PHP session issue and stop using PHP sessions. Instead, roll your own. There are advantage to rolling your own anyway. In fact, I provide a complete class and code example to do it--including an example to use the class to password protect pages. It's on my website at http://www.troywolf.com/articles/php/class_session.

Like being good at anything, you gotta love it a little.

OH yeah, I will definately bookmark your website. I have a PDF called learn PHP in 21 days and think it will help me with the terminology. I have done what you said about searching google but non of the forums I went was as helpful as this one.

So I will start with baby steps and hopefull I will learn how to get my search engine to work. Sometime I get to excited and I go too fast, got to learn to slow down a bit.

Thanks alot.


I will learn alot here from other post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.