I am trying to start a session using session_start() function. I am using xampp's server. But whenever I include this code, the page doesn't load. If I remove this code, the page loads perfectly. Is it a problem with xampp? This is the code placed at the very beginning of the file without any whitespaces before php tag.
<?php
// Start the session
session_start();
?>
Can somebody help me with this?
This is what Apache log says :
[Fri Mar 04 19:13:09.822907 2016] [mpm_winnt:notice] [pid 5444:tid 508] AH00428: Parent: child process 7200 exited with status 3221225477 -- Restarting.
[Fri Mar 04 19:13:10.738482 2016] [ssl:warn] [pid 5444:tid 508] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 04 19:13:10.800485 2016] [mpm_winnt:notice] [pid 5444:tid 508] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations
[Fri Mar 04 19:13:10.800485 2016] [mpm_winnt:notice] [pid 5444:tid 508] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Fri Mar 04 19:13:10.800485 2016] [core:notice] [pid 5444:tid 508] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Fri Mar 04 19:13:10.805024 2016] [mpm_winnt:notice] [pid 5444:tid 508] AH00418: Parent: Created child process 5404
[Fri Mar 04 19:13:12.067176 2016] [ssl:warn] [pid 5404:tid 532] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 04 19:13:12.337492 2016] [ssl:warn] [pid 5404:tid 532] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Mar 04 19:13:12.400429 2016] [mpm_winnt:notice] [pid 5404:tid 532] AH00354: Child: Starting 150 worker threads.