Previous Thread
Next Thread
Print Thread
Hop To
Joined: Dec 2006
Posts: 42
C
newbie
newbie
C Offline
Joined: Dec 2006
Posts: 42
I am having some issues uploading an avatar from the initial user registration screen. This is the error I am getting

Warning: copy(1166399416.jpg): failed to open stream: No such file or directory in /home/mminnis/public_html/ubbthreads/adduser.php on line 749

Can anyone tell me what is causing this?
UbbThreads 6.52b2


Emerald Forest Gaming Community
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Don't currently have access to the older code. Can you paste exactly what you see on line 749 of adduser.php?

Joined: Dec 2006
Posts: 42
C
newbie
newbie
C Offline
Joined: Dec 2006
Posts: 42
Code
// If uploaded has been set to 1, we need to change the uploaded picture file
// and the picture field in the database with the user's number
 if ($uploaded) {
	$newpicname = "{$config['avatarurl']}/$Uid$pictype";
	copy($Picturefile, "$newpicname");
	@unlink($Picturefile);
	$query = "
		UPDATE {$config['tbprefix']}Users
		SET U_Picture='" .addslashes($newpicname)."'
		WHERE U_Number='$Uid'
	";
	$dbh->do_query($query,__LINE__,__FILE__);
}

this is the exact line
Code
copy($Picturefile, "$newpicname");

Users are only able to upload an avatar after they become approved but not at the time of registration. This was not always the case. I can't remember if this is original code or a modification.For future reference if it is modification question should I ask it over at UBBDev?

Thankyou Rick

Last edited by ChAoS; 12/17/2006 9:14 PM.

Emerald Forest Gaming Community

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Ruben), 866 guests, and 176 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)