在session_start()保留在文件加载永远 [英] session_start() keeps the file load forever

查看:220
本文介绍了在session_start()保留在文件加载永远的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PHP与XAMPP。我的PHP文件的工作,但如果我在脚本的任何地方调用session_start(),并运行它,写等待localhost的页面标题和页面加载永远,只是显示一个空白页,并保持加载。

我也试着使错误并显示没有错误。

本上运行:

 < PHP
回声测试;
?>

这不会运行(空白页和页面加载永远)

 < PHP
在session_start();
回声测试;
?>

编辑:
由于弗雷德的建议,我是从发布的phpinfo我的会话信息()结果:

 启用会话支持
登记保存处理程序文件,用户
注册串行处理PHP的php_binary WDDXsession.auto_start关关
session.cache_expire 180 180
session.cache_limiter NOCACHE NOCACHE
session.cookie_domain没有价值没有价值
session.cookie_httponly关关
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure关关
session.entropy_file没有价值没有价值
session.entropy_length 0 0
session.gc_divisor 1000 1000
1440的session.gc_maxlifetime 1440
session.gc_probability 1 1
session.hash_bits_per_character 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check没有价值没有价值
session.save_handler文件的文件
session.save_path的C:\\ xampp2 \\ tmp目录C:\\ xampp2 \\ tmp目录
session.serialize_handler PHP PHP
session.upload_progress.cleanup开开
session.upload_progress.enabled开开
session.upload_progress.freq 1%1%
session.upload_progress.min_freq 1 1
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress。preFIX upload_progress_ upload_progress_
session.use_cookies开开
session.use_only_cookies关关
session.use_trans_sid指定0 0


解决方案

说完看着这对我自己的环境中,它似乎是在XAMPP软件栈本身就是一个小故障,我在系统错误日志中收到错误说明孩子退出的过程有长状态code之后重新启动。这不是一个PHP相关的故障,而它与XAMPP实施故障。我已经转发的错误Bitnami这是该项目的开发成员的细节,并希望他们能够解决这个和发布的更新版本,在此期间,我会建议使用WAMP。

I'm using PHP with XAMPP. My PHP files work, but if I call session_start() in anywhere in the script and run it, writing "Waiting for localhost" at the page title, and page is loading forever, just shows a blank page and keeps loading.

I've also tried enabling the errors and no errors shown.

This runs:

<?php
echo "test";
?>

This doesn't run (blank page and the page is loading forever)

<?php
session_start();
echo "test";
?>

EDIT: Due to Fred's suggestion, I'm posting my session information from phpinfo() result:

Session Support  enabled  
Registered save handlers  files user  
Registered serializer handlers  php php_binary wddx  

session.auto_start Off Off 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_httponly Off Off 
session.cookie_lifetime 0 0 
session.cookie_path / / 
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_divisor 1000 1000 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.hash_bits_per_character 5 5 
session.hash_function 0 0 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path C:\xampp2\tmp C:\xampp2\tmp 
session.serialize_handler php php 
session.upload_progress.cleanup On On 
session.upload_progress.enabled On On 
session.upload_progress.freq 1% 1% 
session.upload_progress.min_freq 1 1 
session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS 
session.upload_progress.prefix upload_progress_ upload_progress_ 
session.use_cookies On On 
session.use_only_cookies Off Off 
session.use_trans_sid 0 0 

解决方案

Having looked into this on my own environment it appears to be a glitch in the XAMPP software stack itself, I receive errors in my system error log indicating that the child process exited with a long status code followed by restarting. This is not a PHP related fault, rather it is a fault with the implementation in XAMPP. I have forwarded the details of the error to Bitnami which is a development member of the project and hopefully they will be able to resolve this and release an updated version, in the meantime I would recommend using wamp.

这篇关于在session_start()保留在文件加载永远的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆