Jump to content

Getting Blank White Display In Main Page


sgs

Recommended Posts

Now, I've found a thing in my file. When I've remove the above line:

require "./global/header.php";

the file (index.php) runs. Check the index.php file here: http://www.sgpaste.tk/index.php and http://www.sgpaste.tk/src/index.php (in text)

and here is header.php file:

http://www.sgpaste.tk/global/header.php and http://www.sgpaste.tk/src/header.php

 

I think the problem relates with header.php

Link to comment
Share on other sites

Ok, as your suggestion, I've removed the

ob_start();

from "header.php" and my "index.php" and others are now executing. But now I'm getting some errors.

In "index.php" I'm getting the following errors:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/sgs/public_html/sgpaste/index.php:12) in /home/sgs/public_html/sgpaste/global/header.php on line 3

and the error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sgs/public_html/

sgpaste/index.php:12) in /home/sgs/public_html/sgpaste/global/header.php on line 3

and I know that, if I remove the "session_start()" function then the problem will be omitted. But I don't want to do that because, if I do that then my project will not work. Or if I add the "ob_start()" function then the previous problem(blank display) will happen. So what to do?

 

And in "login.php" I'm getting the following error after removing the "ob_start()" function:

Warning: Cannot modify header information - headers already sent by (output started at /home/sgs/public_html/sgpaste/global/header.php:27) in /home/sgs/public_html/sgpaste/config/functions.php on line 255

These errors happens where I'm using "$_SESSION/$_COOKIE/header()" please solve my problem...

Here is my "functions.php" file:

Source file of "functions.php": http://www.sgpaste.tk/src/functions.php

Source file of "login.php": http://www.sgpaste.tk/src/login.php

Executable file of "login.php": http://www.sgpaste.tk/login.php

Link to comment
Share on other sites

In login.php remove the check_cookie() function as you are not using the output (BOOL) to check whether cookies are working or not.

 

The problem is just that your output has started and you need to execute the function

session_start

and the

setcookie() function

before the output starts. ( Include those statements before any echo statement or before outputting any data to the user. )

  • Like 1
Link to comment
Share on other sites

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.   Paste as plain text instead

  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...