Jump to content

When using _SESSION, it gives BLANK Page.HELP!!! PHP 5.2, MySQL, Apache 2


Recommended Posts

Hi to everyone,
I installed PHP 5.2, MySQL (latest version) and Apache 2 on Win XP.
it works OK except SESSIONS
when I have a file  beginning like this, it gives a blank page
[code]
session_start();
if (isset ($_SESSION['loggedin']) && isset ($_SESSION['time']))
{
[/code]
I think it must be about php installation.

[code]
Directive Local Value Master Value
session.auto_start On On
session.bug_compat_42 Off Off
session.bug_compat_warn On On
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 no value no value
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:\Program Files\PHP\sessions C:\Program Files\PHP\sessions
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid 0 0
[/code]
Can someone help?
Thanks for reading..
Link to comment
Share on other sites

You have auto sessions enabled. Disable this setting in the php.ini when you do restart Apache. There is nothing wrong with your code.


However what I recommend you to do is to search for the following in the php.ini:
[tt]display_errors = Off[/tt]
and change it to [tt][tt]display_errors = Onn[/tt] - save php.ini and restart Apache. You should always enable this setting when you get problems with your scripts. It will show any errors that occur to you on screen.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.