Plogger Support Forum - ZIP Upload > write_error Fri, 29 Mar 2024 10:08:25 +0000 http://www.plogger.org/forum/ Lussumo Vanilla 1.1.10 ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9941#Comment_9941 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9941#Comment_9941 Mon, 23 Feb 2009 14:48:31 +0000 eleven
I'm starting to test the system, and i can't seem to find the problem with uploading photos in ZIP format.

After i've uloaded i get this error:
There were some problems importing the files:

DSC_0050.jpg: write_error
DSC_0052.jpg: write_error
DSC_0054.jpg: write_error

You can proceed to the Import section to view any files that were successfully uploaded.


There is nothing in the Import section... Could anyone give me a clue about this?

TY in advance!.]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9942#Comment_9942 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9942#Comment_9942 Mon, 23 Feb 2009 14:54:15 +0000 sidtheduck ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9943#Comment_9943 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9943#Comment_9943 Mon, 23 Feb 2009 15:00:30 +0000 eleven The Import tab had a notice asking me to change it to 755 to improve security, so i did. Still didn't worked.]]> ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9944#Comment_9944 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9944#Comment_9944 Mon, 23 Feb 2009 15:03:27 +0000 eleven First tryes, my ZIP files had OSX file content, so that was why they didn't worked.
Then, i've done the CMOD to 755 and fixed the ZIP, still didn't Worked.

i've just CMOD back to 777 and tryed the new ZIP. Works OK!!!

Thanks for the quick reply!]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9945#Comment_9945 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9945#Comment_9945 Mon, 23 Feb 2009 16:08:57 +0000 sidtheduck ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9946#Comment_9946 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9946#Comment_9946 Mon, 23 Feb 2009 16:14:04 +0000 eleven it worked one time only...
i just don't get it.
i'll keep trying.]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9947#Comment_9947 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9947#Comment_9947 Mon, 23 Feb 2009 16:19:41 +0000 eleven
When i upload a ZIP, plogger creates a new folder to decompress. THAT folder has default 755 CHMOD.

So it just can't write inside. ¿How can i fix this?
(My server is running in Safe Mode, and i can't change that.)

Thanks 4 replying!]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9948#Comment_9948 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9948#Comment_9948 Mon, 23 Feb 2009 16:46:17 +0000 sidtheduck
Which version of Plogger are you running? Based on the notices, I thought you were running revision 590 (which should work on safe_mode if you gave your FTP credentials during install, but that would require your server has PHP FTP functions). During install or upgrade were you asked for FTP information?]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9949#Comment_9949 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9949#Comment_9949 Mon, 23 Feb 2009 21:54:53 +0000 eleven During installation, i've provided the FTP info as requested.

Is there a way to check if PHP is able to use the FTP protocol?]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9950#Comment_9950 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9950#Comment_9950 Mon, 23 Feb 2009 22:19:23 +0000 eleven <?php
if (function_exists('ftp_connect')) { echo "FTP_CONNECT Avalible.<br />\n";} else { echo "FTP_CONNECT Not Avalible.<br />\n";}
if (function_exists('ftp_mkdir')) {echo "FTP_MKDIR Avalible.<br />\n";} else {echo "FTP_MKDIR Not Avalible.<br />\n";}
if (function_exists('ftp_chmod')) {echo "FTP_CHMOD Avalible.<br />\n";} else {echo "FTP_CHMOD Not Avalible.<br />\n";}
?>


Response:
FTP_CONNECT Avalible.
FTP_MKDIR Avalible.
FTP_CHMOD Not Avalible.


So, i think somehow my server doesn't allow ftp CHMOD.
What do you think?]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9953#Comment_9953 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9953#Comment_9953 Tue, 24 Feb 2009 03:17:24 +0000 sidtheduck
To fix, open plog-admin/plog-upload.php and find the following code (should be around line 64):
$results = $archive->extract(PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $zipdir);
and change it to read:
if (is_safe_mode()) {
chmod_ftp($zipdir, 0777);
}
//extract to 'plog-content/uploads/' folder
$results = $archive->extract(PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $zipdir);
if (is_safe_mode()) {
chmod_ftp($zipdir);
}


That should do it for you! Let me know if it works for you and I'll make sure to add the code to the codebase.]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9955#Comment_9955 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=9955#Comment_9955 Tue, 24 Feb 2009 09:00:28 +0000 eleven TY so much for the support, I hope this contributes to the improvement of the compatibility.
I owe you!

I'll be in touch!]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11708#Comment_11708 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11708#Comment_11708 Wed, 11 Nov 2009 06:08:21 +0000 nicky77 ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11712#Comment_11712 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11712#Comment_11712 Wed, 11 Nov 2009 18:00:21 +0000 sidtheduck
Yes, if you upload pictures to folders in the "Uploads" folder via FTP, you will have to change the folder permissions to 777 in order to Import them. Basically, it's because when you upload or create a folder via FTP, it is a different user account than that of the PHP script so you are not able to move the files out of that folder without 777 permissions (you would most likely be able to "copy" the images, but not "cut" or "delete" the images within that folder from a PHP script). Does that make sense?]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11738#Comment_11738 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11738#Comment_11738 Thu, 12 Nov 2009 11:21:21 +0000 nicky77
A problem I have here though is that even when I manually chmod the folder (in plog-content/uploads) to 777, when I go to import the folder to the gallery it creates an album with the name of the folder, however none of the images are actually moved. If I go to Manage, I can see that a new album has been created but it contains no images. In the import tab, i still see the folder I wanted to create an album with. If I then try again, it will work as this time I am assigning the images to an existing album. Any idea what's going on here? Can't see any permissions issues as all the necessary folders are 777....]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11741#Comment_11741 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11741#Comment_11741 Thu, 12 Nov 2009 12:01:41 +0000 sidtheduck
Just to clear up my understanding of your situation, here is a list of the process you do:
1. Upload files to "uploads/" folder so they are displayed in the Import tab.
2. CHMOD newly uploaded folder to 777.
3. Login and navigate to Import tab.
4. Attempt to Import pictures.
5. No pictures imported, but new album and corresponding directory in the "images/" folder are created.
6. Attempt to import pictures again.
7. Pictures imported because album / album directory are now existing.

Is that correct?

Also, chown() most of the time does not work unless PHP is running as the root superuser (which is definitely not recommended, so then you're back to exec() or shell_exec() which you would still most likely need root credentials). From the PHP manual for chown() -> "Only the superuser may change the owner of a file."]]>
ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11742#Comment_11742 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11742#Comment_11742 Thu, 12 Nov 2009 12:24:50 +0000 nicky77 ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11743#Comment_11743 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11743#Comment_11743 Thu, 12 Nov 2009 12:35:48 +0000 sidtheduck ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11744#Comment_11744 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11744#Comment_11744 Thu, 12 Nov 2009 13:39:35 +0000 nicky77 ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11746#Comment_11746 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11746#Comment_11746 Thu, 12 Nov 2009 13:50:59 +0000 sidtheduck ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11747#Comment_11747 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11747#Comment_11747 Thu, 12 Nov 2009 14:05:37 +0000 nicky77 ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11748#Comment_11748 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=11748#Comment_11748 Thu, 12 Nov 2009 14:24:17 +0000 sidtheduck ZIP Upload > write_error http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=12932#Comment_12932 http://www.plogger.org/forum/comments.php?DiscussionID=2521&Focus=12932#Comment_12932 Tue, 15 Jun 2010 18:21:27 +0000 TriinKK
When I try to upload a zip file it says

"Notice: Only variables should be assigned by reference in /~/www/soblajobla.host-ed.net/plog-includes/lib/pclzip-2-4/pclzip.lib.php on line 233

Warning: Cannot modify header information - headers already sent by (output started at /~/www/soblajobla.host-ed.net/plog-includes/lib/pclzip-2-4/pclzip.lib.php:233) in /~/www/soblajobla.host-ed.net/plog-admin/plog-upload.php on line 88"

Can anyone give me exact lines what and where I need to change?!]]>