PHP Simplicity Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Guest posting is allowed. Again!

Author Topic: Upload Protection / With Password  (Read 1458 times)

0 Members and 1 Guest are viewing this topic.

gdog26

  • Newbie
  • *
  • Offline Offline
  • Posts: 8
    • View Profile
Upload Protection / With Password
« on: October 20, 2009, 07:57:19 PM »

In my SFUConfig.php
I set the Password to TRUE, at false it work fine, but not when it is set to TRUE

I'm getting the following error

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/blah/public_html/beta2/index-en.php:8) in /home/blah/public_html/beta2/upload/upload.php on line 68


I'm really newbie in PHP etc... so if you can give me the direct code this would be great! :)
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Upload Protection / With Password
« Reply #1 on: October 24, 2009, 07:26:12 AM »

If you had just read the FAQs.txt, you would have known ;)

It's because index-en.php has some output before you included upload.php in it. Have at the top of index-en.php:
Code: [Select]
<?php
session_start
();
?>

This should fix your problem.
Logged

We don't need a reason to help people

gdog26

  • Newbie
  • *
  • Offline Offline
  • Posts: 8
    • View Profile
Re: Upload Protection / With Password
« Reply #2 on: October 25, 2009, 10:02:16 AM »

I've added the code but same problem...

Where should I add the code??? In the <head> </head>  or <body>.. ?
Logged

Saleh

  • Administrator
  • Full Member
  • *****
  • Offline Offline
  • Posts: 222
    • View Profile
    • PHP Simplicity
Re: Upload Protection / With Password
« Reply #3 on: October 25, 2009, 06:17:53 PM »

Not in head or body. At the very top before anything HTML.

if you file was like this:
Code: [Select]
<html>
<head>
....

you add the line I mentioned at the top like this:
Code: [Select]
<?php
session_start
();
?>

<html>
<head>
...
Logged

We don't need a reason to help people
 

+ Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.
Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What is the answer to one plus one? (in numbers):