+3  A: 

You need to call session_write_close() once you no longer need to write to the session. Currently as both your scripts have the session open for their entire duration, you will only be able to have one running at a time.

From the manual:

Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time. When using framesets together with sessions you will experience the frames loading one by one due to this locking. You can reduce the time needed to load all the frames by ending the session as soon as all changes to session variables are done.

Tom Haigh
A: 

Having two session_starts() in your script is a bad thing anyway.

Why don't you just start the session on your parent.php file (and not child.php)? Or just child.php and not parent.php

It's a good idea to have one page that is included by all other pages that initializes everything (SQL connect, session start, etc). And then include that page on all others.

Bart S.
A: 

Try using session_write_close() before loading your child page.

kmkaplan
+1  A: 

You can also check if a session is already started and only start a new one if not:

    if (!isset($_SESSION)) session_start();
jeroen
In this case the session is not started by the same page.
kmkaplan
It looks like the same page, just a different script. I have used this to use the same session in an ajax include on initial page load (when the session is already started as opposed to the ajax call when I need to start the session).
jeroen
+1  A: 

Besides that only one session can be used at a time. You need to call the session_regenerate_id function to generate a new ID:

if (session_id() != '') {
    session_write_close();
}
session_start();
session_regenerate_id();

Otherwise the parent’s session ID would also be used for the child’s session.

Gumbo
A: 

Big thanks to everyone.

Using session_write_close() was the solution!

PHP thinker