PHP Classes

ajax File Uploader problem

Recommend this page to a friend!

      AJAX File Uploader  >  All threads  >  ajax File Uploader problem  >  (Un) Subscribe thread alerts  
Subject:ajax File Uploader problem
Summary:session error occurs
Messages:6
Author:Edwin Cadthuz
Date:2007-04-25 16:41:52
Update:2009-04-13 08:20:44
 

  1. ajax File Uploader problem   Reply   Report abuse  
Picture of Edwin Cadthuz Edwin Cadthuz - 2007-04-25 16:41:52
I get the following error message while i try to do with your file uploader class. I did not change any thing in your files downloaded today from the phpclasses.org


Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/speedxso/public_html/ul2/index.php:5) in /home/speedxso/public_html/ul2/AjaxFileUploader.inc.php on line 11

I could not figure out where the out put started before your session_start() call. Please give me a solution at your convenience.

is it the problem of files which i've downloaded. Or is it because of some explorer setting...??

regards

  2. Re: ajax File Uploader problem   Reply   Report abuse  
Picture of Cyberscorp Cyberscorp - 2007-04-25 16:53:14 - In reply to message 1 from Edwin Cadthuz
Hi,

you can move the line session_start() from AjaxFileUploader.inc.php to index.php (to put in first line without any spaces before).

bye

  3. file upload problem   Reply   Report abuse  
Picture of Edwin Cadthuz Edwin Cadthuz - 2007-04-26 09:45:55 - In reply to message 2 from Cyberscorp
Thanx to Cyberscop for the "session error" solution

Now the new problem occurs when i upload the file. I get the following error message : "Failed to upload file" is there any way out for this. I try this upload on my linux based webserver.

I've checked for the destination folder "uploads" which is very much there. Now what could be the problem. Could you please help me. I am very new to this file uplink concept

looking forward with gratitude

  4. Re: ajax File Uploader problem   Reply   Report abuse  
Picture of Cyberscorp Cyberscorp - 2007-04-26 11:23:16 - In reply to message 3 from Edwin Cadthuz
Hello,

Is your uploads folder writable ?

chmod 777 uploads

cordially.

  5. Re: ajax File Uploader problem   Reply   Report abuse  
Picture of Edwin Cadthuz Edwin Cadthuz - 2007-04-26 16:34:33 - In reply to message 4 from Cyberscorp
Yes the "uploads" folder is writable. As per your advice I have checked it again. The folder permissions are 777. Anything else is to be checked at my end

  6. Re: ajax File Uploader problem   Reply   Report abuse  
Picture of Palash Chakravorty Palash Chakravorty - 2009-04-13 08:20:45 - In reply to message 5 from Edwin Cadthuz
ob_start();
Just put this code before session_start(); function.