timmah1 Posted January 13, 2009 Share Posted January 13, 2009 When I build my pages, I build a header and a footer, then use a simple include or require to insert them on to other pages I'm moving to a new hosting company, I have this on my header page <?php session_start(); require("config.php"); $copy = date("Y"); //grab the current year for the copyright Then, my index page is like so <?php session_start); require("header.php"); ?> This worked fine on my other site, but now I get an error saying Warning: session_start() [function.session-start]: open(/tmp/sess_ef6b506f46073402fe96acfde25bf616, O_RDWR) failed: Permission denied (13) in /home/public_html/index.php on line 2 Is this because my domain name is not yet Propagated, and I'm using an IP right now, or could it be something else? Is it necessary to declare session_start() on every page, even though it's being defined in the header? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/140609-solved-simple-question/ Share on other sites More sharing options...
trq Posted January 13, 2009 Share Posted January 13, 2009 Is this because my domain name is not yet Propagated, and I'm using an IP right now, or could it be something else? It appears that you do not yet have permission to write to the /tmp directory where php stores the server side session cookies. I'd speak to your host. Is it necessary to declare session_start() on every page, even though it's being defined in the header? Nope. Header only need to be called within scope of the current request. Link to comment https://forums.phpfreaks.com/topic/140609-solved-simple-question/#findComment-735805 Share on other sites More sharing options...
timmah1 Posted January 13, 2009 Author Share Posted January 13, 2009 Thanks thorpe Link to comment https://forums.phpfreaks.com/topic/140609-solved-simple-question/#findComment-735807 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.