| | |
Please Help Header Error
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2005
Posts: 11
Reputation:
Solved Threads: 0
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
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
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.
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.
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.
•
•
Join Date: Jul 2005
Posts: 11
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- 500 internal server error (*nix Software)
- Cannot modify header information.Headers already sent (PHP)
- How to solve header - error -PHP (PHP)
- Errors with smtp-vilter, ClamAv, and SpamAssassin on Fedora Core 2 (*nix Software)
- main class could not be found? (Java)
Other Threads in the PHP Forum
- Previous Thread: two forums on the same server --> one database?
- Next Thread: Multi-Page Search Navigation
| Thread Tools | Search this Thread |
301 access apache api array autocomplete beginner binary broken button cakephp checkbox class cms code compression cron curl data database date display dropdown dropdownlist duplicates dynamic echo email error execution file files folder form forms function functions google href htaccess html htmlspecialchars httppost image include insert integration ip javascript joomla jquery limit link links login mail md5 menu methods mlm multiple mysql oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote script search secure server session sessions sms source space sql subscription syntax system table tutorial update upload url validator variable video virus volume votedown web youtube





