Please Help Header Error

Reply

Join Date: Jul 2005
Posts: 11
Reputation: lawfour is an unknown quantity at this point 
Solved Threads: 0
lawfour lawfour is offline Offline
Newbie Poster

Please Help Header Error

 
0
  #1
Jul 29th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Please Help Header Error

 
0
  #2
Jul 29th, 2005
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.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 11
Reputation: lawfour is an unknown quantity at this point 
Solved Threads: 0
lawfour lawfour is offline Offline
Newbie Poster

Re: Please Help Header Error

 
0
  #3
Jul 29th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 354
Reputation: Troy is an unknown quantity at this point 
Solved Threads: 5
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Please Help Header Error

 
0
  #4
Jul 29th, 2005
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.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 11
Reputation: lawfour is an unknown quantity at this point 
Solved Threads: 0
lawfour lawfour is offline Offline
Newbie Poster

Re: Please Help Header Error

 
0
  #5
Jul 29th, 2005
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC