Plogger Support Forum - Error when uploading zip: Cannot modify header information - headers already sent by Fri, 29 Mar 2024 14:40:33 +0000 http://www.plogger.org/forum/ Lussumo Vanilla 1.1.10 Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13162#Comment_13162 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13162#Comment_13162 Sun, 22 Aug 2010 21:46:39 +0000 tojsha
I get the following error message when uploading a zip file through the upload tab. It shows when the zip is uploaded (successfully). I have integrated Plogger into the website and all other features work fine. See here <a href="http://cakeseleven.com.au/photogallery/index.php">

<code>Notice: Only variables should be assigned by reference in /homepages/24/d336574027/htdocs/photogallery/plog-includes/lib/pclzip-2-4/pclzip.lib.php on line 233

Warning: Cannot modify header information - headers already sent by (output started at /homepages/24/d336574027/htdocs/photogallery/plog-includes/lib/pclzip-2-4/pclzip.lib.php:233) in /homepages/24/d336574027/htdocs/photogallery/plog-admin/plog-upload.php on line 88</code>


I would be verty grateful for any comment on this. There are only 3 similar problems described in the forums but no answer.

Tojsha]]>
Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13163#Comment_13163 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13163#Comment_13163 Sun, 22 Aug 2010 23:55:05 +0000 boblennon Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13164#Comment_13164 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13164#Comment_13164 Mon, 23 Aug 2010 00:44:02 +0000 tojsha
I can't paste the script, but it is the actual version ..

I hope that helps ..

Thanks so far ;)
Manuela]]>
Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13165#Comment_13165 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13165#Comment_13165 Mon, 23 Aug 2010 02:02:08 +0000 tojsha Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13166#Comment_13166 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13166#Comment_13166 Mon, 23 Aug 2010 10:43:44 +0000 boblennon
As I see it, Plogger makes a semantic distinction between "integration" and "embedding".

The Plogger docs tout integrating plogger with 3 lines of php code - and warns about the whitespace problem and the "headers already sent" errors that can occur when gallery.php is included. This kind of integration, while simple, is only a technique to "drop-in" a Plogger gallery to a specific page.

Unfortunately Plogger is endowed with a mindset that the world revolves around a photo gallery and it is in control of that world. That view often clashes with the design and purpose of the website and its supporting pages.

In other words, this integration is usually not "seamless", and if you want the functionality of your site to be that way then you have to "embed" Plogger into submission with php.

Embedding requires significant changes to the _install.php, the plog-config.php, and to most of the php pages in the plog-admin directory. Worse, it promises a nightmare update when a new version of Plogger is released. But the good news is that it brings the wealth of Plogger functionality into your website without changing its design or presentation essences.

So getting back to the "headers already sent" issue, I think this forum would be overflowing with complaints about uploading a zip file if it was a Plogger malfunction. Since it is not, then it seems logical that the problem lies in the way you either "integrated" or "embedded" Plogger into your website.

Since there are so many coding variations involved I can only offer a couple of suggestions. First, save Plogger some trouble and set the 'PLOGGER_EMBEDDED' definition in plog-config.php to true (1). Second, you might consider enclosing your integration code in an output buffering envelope with ob_start and ob_end_flush. And finally perhaps setting the 'PLOGGER_DEBUG' definition to 1 in plog-config.php may provide you a better insight into the problem.]]>
Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13167#Comment_13167 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13167#Comment_13167 Mon, 23 Aug 2010 10:49:07 +0000 boblennon Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13173#Comment_13173 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13173#Comment_13173 Tue, 24 Aug 2010 16:54:11 +0000 tojsha Error when uploading zip: Cannot modify header information - headers already sent by http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13174#Comment_13174 http://www.plogger.org/forum/comments.php?DiscussionID=3346&Focus=13174#Comment_13174 Tue, 24 Aug 2010 21:37:12 +0000 boblennon
There's a good write-up about solving this problem along with some simplified code to illustrate the points. It's at:

http://www.slunked.com/blog/php/2010/01/how-to-fix-header-already-sent-error-in-php/3]]>