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
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
2 members (SteveS, vscope), 455 guests, and 117 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)