Sessions in PHP 7
<p>I have been working with PHP 5.xx for years but recently updated to PHP 7. I can't create sessions.</p><p>I have read the documentation.</p><p>In earlier PHP, you just have to do:</p><pre><br /><code>session_start();<br /></code><br /></pre><p>to start session, but this doesn't work with PHP 7 and my page keeps loading. I provided the array in the parameter too as documented on the PHP website but still it keeps loading the page.</p><p>I have tried this:</p><pre><br /><code>session_start([<br />'cache_limiter' => 'private',<br />'read_and_close' => true,<br />]);<br /></code><br /></pre><p>But my browser keeps loading and after few seconds it displays 'This webpage is not available'</p><p>Apache restart errors:</p><blockquote><p>[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations</p><p>[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39</p><p>[Wed Dec 30 00:45:16.470001 2015] [core:notice] [pid 2384:tid 376] AH00094: Command line: 'c:\xampp\apache\bin\httpd.exe -d C:/xampp/apache'</p><p>[Wed Dec 30 00:45:16.470001 2015] [mpm_winnt:notice] [pid 2384:tid 376] AH00418: Parent: Created child process 1716</p><p>[Wed Dec 30 00:45:17.172064 2015] [ssl:warn] [pid 1716:tid 384] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name</p><p>[Wed Dec 30 00:45:17.343941 2015] [ssl:warn] [pid 1716:tid 384] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name</p><p>[Wed Dec 30 00:45:17.375192 2015] [mpm_winnt:notice] [pid 1716:tid 384] AH00354: Child: Starting 150 worker threads.</p></blockquote><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34524802/sessions-in-php-7">http://ift.tt/1mhPzI1</a></h2>
Nhận xét
Đăng nhận xét