close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Warning: session_start() [function.session-start]: Node no longer exists in...

Thread begun 4/27/2011 12:14 am by CraigR | Last modified 9/26/2011 10:37 pm by niviit31430686 | 34374 views | 11 replies |

CraigRBeta Tester

Warning: session_start() [function.session-start]: Node no longer exists in...

I recently moved hosting provider, and have come across an error which I hadn't previously noticed. (the error doesn't occur on my local server, only my hosting server)


Warning: session_start() [function.session-start]: Node no longer exists in /xxx/galleryoptions.php on line 3


Line 3 on this page is as follows...


if (!session_id()) session_start();




If I comment out line 3, the error disappears

Sign in to reply to this post

Dave BuchholzBeta Tester

Do either of these links help

831550-session_start-node-no-longer-exists

t-10288395.html

are you using PHP5 code on a PHP4 server ?

Sign in to reply to this post

CraigRBeta Tester

Hi Dave, thanks for the feedback.

My hosting server is using php 5.2.12.

I can get rid of the message by commenting out the session_start line, (also suggested in one of the links you provided), but would like to understand why.

Sign in to reply to this post

Dave BuchholzBeta Tester

What's on the first two lines ?

Sign in to reply to this post

CraigRBeta Tester

Here is the php block before the doctype...

<?php require_once('Connections/photostudio.php'); ?>
<?php
//if (!session_id()) session_start();
if(!isset($_SESSION["gallery"])) {
$_SESSION["gallery"] = "grid_fullsize";//default value
}
if((((isset($_POST["gallerytype"]))?$_POST["gallerytype"]:"") != "")) {
$_SESSION["gallery"] = "".((isset($_POST["gallerytype"]))?$_POST["gallerytype"]:"") ."";
}
$gallery =($_SESSION['gallery']);
?>
Sign in to reply to this post

Dave BuchholzBeta Tester

this is the code I use to initialise sessions

php:
/*

Enable Sessions
---------------------------------------------------------- 
*/

if (!isset($_SESSION)) {
  session_start();
}



note the extra braces, try that and see if he makes a difference.

I have never seen this error and as you have no doubt found Google is not much help

Sign in to reply to this post

CraigRBeta Tester

thanks Dave , but no luck yet

I also checked the php.ini on my hosting server to see if session.auto_start was set, but it isn't.

Sign in to reply to this post

Dave BuchholzBeta Tester

sorry, don't know what else to suggest

hopefully Jason will have a bright idea

Sign in to reply to this post

CraigRBeta Tester

he usually does !

just noticed, when the page loads for the first time, all is ok.

use the form in the header to change the look, the page reloads.

on the second reload, the error occurs.

galleryoptions.php

Sign in to reply to this post

Jason ByrnesWebAssist

I dont have any bright ideas on the cause of the problem, sorry guys.

to make the error go away, and still start the session, change:

php:
if (!session_id()) session_start();



to:

php:
@session_start();



This will run the session_start() function and suppress any errors that may occur.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...