Upload module 1.1 - Error uploading file

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2009, 02:10 PM
New Pligger
Pligg Version: 1.0
 
Join Date: Jul 2009
Posts: 9
I have a question for Yankidank or whoever has experienced a similar issue.

I am running Pligg version 1.0 (just installed a few days ago) and have been experiencing problems getting the upload module (version 1.1) to successfully upload an image.

The message I receive is "ERROR: Error copying file to /.../blog.drivers-republic.com/...//modules/upload/attachments/GoodwoodcompthumbFIN", which I have traced as being initiated from the following section of code within the file upload_main.php:

You can try it for yourself at http://blog.drivers-republic.com/pligg/

Code:
if ($ext && in_array(strtolower($ext),$extensions))
		    {
			    while (file_exists("$upload_dir/$name$i.$ext")) $i++;
			    $name .= $i;
	
		            if (@move_uploaded_file($tmp_name, "$upload_dir/$name.$ext"))
			    {
				$db->query("INSERT INTO ".table_prefix."files 
						SET file_size='orig',
						    file_user_id={$current_user->user_id},
						    file_link_id={$linkres->id},
						    file_real_size='{$_FILES["upload_files"]["size"][$key]}',	
						    file_fields='".base64_encode(serialize($fields))."',
						    file_name='".$db->escape("$name.$ext")."'");
				$count++;
				$last_id = $db->insert_id;
				$error = generate_thumbs("$upload_dir/$name.$ext",$linkres->id,$settings,$db->insert_id);
			    }
			    else
				$error = "Error copying file to $upload_dir/$name";
		    }
		    else
			$error = "Extension .$ext is not allowed";
I have applied CHMOD of 777 to the relevant directories on my server, namely /modules/upload/attachments/ and /modules/upload/attachments/thumbs/ and even set upload_settings.php to 777 just in case.

Also, regardless of the file that I try and upload the file quoted in my error message remains the same (i.e. GoodwoodcompthumbFIN), which strikes me as an error in itself.

Before I start hacking away at the code syntax in the upload_main.php file, could someone please advise if there is any other reason that may be causing this?

Thanks
Reply With Quote
  #2 (permalink)  
Old 07-22-2009, 02:13 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
Moved to the Module Support forum. Please only post in the correct forums.
Reply With Quote
  #3 (permalink)  
Old 07-22-2009, 03:22 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
You mentioned the thumbs folder, but did you CHMOD 777 /modules/upload/attachments ?

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #4 (permalink)  
Old 07-22-2009, 03:51 PM
New Pligger
Pligg Version: 1.0
 
Join Date: Jul 2009
Posts: 9
Yes, I mentioned both 'attachments' and 'attachments/thumbs' folders in my posts above. I have deleted the complete Pligg installation twice and then reinstalled again, erring towards CHMOD 777 on these and any other folders that might be involved, but thus far to no avail.

Any other suggestions?

As you can see I am using the default Wistie template at the moment, but I would like to use TacticNews once I can sort out this image upload issue.

Thanks for any help you can provide.
Reply With Quote
  #5 (permalink)  
Old 07-24-2009, 05:12 AM
New Pligger
Pligg Version: 1.0
 
Join Date: Jul 2009
Posts: 9
Hi Yankidank, I am still unable to launch my Pligg site due to this image upload problem. I would really appreciate any further suggestions that would help resolve it.

Thanks
Reply With Quote
  #6 (permalink)  
Old 07-24-2009, 09:08 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
My only suggestion is to try re-uploading the module and reinstall it to make sure that there wasn't a problem from the first install. The error looks like the server can't move the file and the most likely problem would be bad CHMOD settings.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #7 (permalink)  
Old 07-24-2009, 01:49 PM
New Pligger
Pligg Version: 1.0
 
Join Date: Jul 2009
Posts: 9
Thanks. I will download a fresh copy of Pligg V1.0 and then re-try the install. I will let you know what I discover.
Reply With Quote
  #8 (permalink)  
Old 08-06-2009, 11:34 PM
New Pligger
 
Join Date: Jul 2009
Posts: 2
I am experiencing the same issue - any resolution yet?
Reply With Quote
  #9 (permalink)  
Old 10-03-2009, 09:18 PM
New Pligger
 
Join Date: Aug 2009
Posts: 11
Hi All;
I am so sorry to get back on this issue, I know that this threads started back in July, but I am having the same issue and I don't see a way to fix it here. Can anyone of you help me with this?

Al
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload Module (File and Image Attachment) Yankidank Free Modules 268 02-03-2012 12:19 PM
Index.php won't open to install nigelnix Questions and Comments 8 04-15-2010 06:19 PM
[MOD] File Upload Module (v0.1) -- Looking for testers cent Questions and Comments 54 06-11-2008 11:34 AM
[MOD] File Upload Module -- seeking requests for features cent Questions and Comments 2 08-11-2007 05:39 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development