cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot send headers, headers already sent

Cannot send headers, headers already sent

Cannot send headers; headers already sent in /customers/b/5/f/xxxxxx/httpd.www/app/code/community/Exinent/CustomerActivation/controllers/AccountController.php, line 252

 

Getting this error after a customer signs up. All information is being written to the database  and it's not too much of an issue just a slight annoyance that I could do without really haha. This is the code but I can't seem to find the issue.

 

            }
                
                try {
                $logoImage='';
                $uploader = new Varien_File_Uploader('attachment');
                $uploader->setFilesDispersion(true);
                $uploader->setFilenamesCaseSensitivity(false);              
                $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png', 'pdf'));
                $uploader->setAllowRenameFiles(true);
                $path = Mage::getBaseDir('media') . DS . 'customerlogs' . DS;
                $uploader->save($path, $_FILES['attachment']['name']);
                $fileName = $uploader->getUploadedFileName();
                $logoImage = 'customerlogs/' . $fileName;
                $customer->setLogoImage($logoImage);
                    
                } catch (Exception $e) {
                    echo $e->getMessage(); //Line 252 where the error is - SMKDsite
                    Mage::log($e->getMessage());
                }