3

I've recently switched from years of WAMP to XAMPP because I wanted PHP 7, but I've noticed something I've never experienced before, it wont load php files that have session_start(); in them. I just get "Waiting for localhost..." in Chrome/IE/FF. As soon as I remove that line the page loads.

Worked fine in wamp.

Basically every page that contains session_start(); wont load, super weird. But if I remove it, they load and show.

Why?

error log just notices

[Sun Dec 27 02:52:19.346602 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations
[Sun Dec 27 02:52:19.346602 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00456: Apache Lounge VC14 Server built: Dec  9 2015 10:17:39
[Sun Dec 27 02:52:19.346602 2015] [core:notice] [pid 3272:tid 372] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sun Dec 27 02:52:19.348604 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00418: Parent: Created child process 2744
[Sun Dec 27 02:52:19.607869 2015] [ssl:warn] [pid 2744:tid 380] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Dec 27 02:52:19.674491 2015] [ssl:warn] [pid 2744:tid 380] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Dec 27 02:52:19.699518 2015] [mpm_winnt:notice] [pid 2744:tid 380] AH00354: Child: Starting 150 worker threads.

EDIT: just found this, I have the exact same problem. he never found a solution

session_start() keeps the file load forever

EDIT2: I went back to WAMP and installed php7 myself

Community
  • 1
  • 1
Jorm
  • 609
  • 2
  • 6
  • 11
  • Could we please take a look at your code? – Phiter Dec 27 '15 at 02:00
  • dont matter, even an file with only session_start() keeps loading forever. check my edit – Jorm Dec 27 '15 at 02:30
  • Is your browser accepting cookies? Have you tried connecting to `127.0.0.1` instead? Have you tried setting up `init_set()` to display errors? – Kamil Gosciminski Dec 27 '15 at 02:41
  • @ConsiderMe, Yes, yes and yes, I get no errors, which probably is because the page wont load as soon as it sees "session_start()". probably going back to wamp today – Jorm Dec 27 '15 at 08:52
  • I've got exactly the same problem, with the error `[Sun Dec 27 20:48:24.481770 2015] [mpm_winnt:notice] [pid 1188:tid 488] AH00428: Parent: child process 672 exited with status 3221225477 -- Restarting.` as well. – pcuser42 Dec 27 '15 at 18:23

4 Answers4

5

Find in php.ini:

session.use_only_cookies=0 

change to:

session.use_only_cookies=1

I had the same trouble with the latest XAMPP version 7.0.1 with php7.

According to Bitnami Developers via Apache Friends Support:

The issue is related to the use_only_cookies variable that you can find in the Session's section of the php.ini file. Apache will crash if the use_only_cookies variable in the Session's section is set to 0 and everything is fine if it's set to 1.

We'll include those changes in the next version of XAMPP with PHP 7. We are building the installers with the version 7.0.2 and we'll release them as soon as possible.

Hope this helps.

Community
  • 1
  • 1
BrookeAH
  • 175
  • 2
  • 8
1

I've included this in my header.php

<?php session_start(); ?>

and that works fine with the latest version of XAMPP with the Apache and MySQL modules running.

CasperEngl
  • 23
  • 6
  • I've tried making my index.php just , my site wont load. No problem in wamp. I downloaded xampp an hour ago – Jorm Dec 27 '15 at 02:06
1

Run XAMPP as administrator. I just figured it out by going to this website:
https://teamtreehouse.com/community/solved-xampp-apache-error

Pang
  • 9,564
  • 146
  • 81
  • 122
Sugumar Venkatesan
  • 4,019
  • 8
  • 46
  • 77
  • I was facing exactly the same problem with php 7.0.1 on xampp v3.2.2, this solved the problem like magic. Thanks for this answer – ChimaJ May 23 '19 at 17:36
1

I had the same problem, I just uninstall and install the 5.6.15 XAMPP version and the problem was solved, I thought that it was my Windows 8.1, but apparently there is a bug in 7.0.0

goliath309
  • 11
  • 3