diff --git a/lib/SimpleSAML/SessionHandlerPHP.php b/lib/SimpleSAML/SessionHandlerPHP.php
index cd669ee996a06cb045cd68e05a1e928a1d720908..c669aeee90a87f5b53d6ecc02199ed02fb6479b3 100644
--- a/lib/SimpleSAML/SessionHandlerPHP.php
+++ b/lib/SimpleSAML/SessionHandlerPHP.php
@@ -21,8 +21,15 @@ class SimpleSAML_SessionHandlerPHP extends SimpleSAML_SessionHandler {
 		 */
 		parent::__construct();
 
-		/* Initialize the php session handling. */
-		session_start();
+		/* Initialize the php session handling.
+		 *
+		 * If session_id() returns a blank string, then we need
+		 * to call session start. Otherwise the session is already
+		 * started, and we should avoid calling session_start().
+		 */
+		if(session_id === '') {
+			session_start();
+		}
 	}