FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Failure loading avatars
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Failure loading avatars [message #34475 is a reply to message #34461] Fri, 03 November 2006 14:39 Go to previous messageGo to previous message
steenbras is currently offline  steenbras   South Africa
Messages: 9
Registered: November 2006
Karma:
Junior Member
Pretty quiet on here at the moment!

Been doing some more digging, and I'm getting further, but it's still not working properly. (Please bear with me on this long posting).

The reason I was getting the "Specified url does not contain a valid image" was because of the default value of upload_tmp_dir in php.ini which xampp set during install - the directory separators were \ rather than / or \\ so were being treated as escape characters.

The net effect was that the full path returned by the "tmp_name" element of the $_FILES array was a path missing separators, so obviously no url was found.

I fixed this by changing the upload_tmp_dir to use forward slashes, and then, at least, the code got as far as safe_tmp_copy in register.php. This was where I hit the next snag. is_uploaded_file always returns false, and therefore move_uploaded_file always failed. I couldn't overcome this without a change to code (very reluctant to do that but I can't see another way of doing it), so I made this code change:
	if (!move_uploaded_file($source, ($name = tempnam($GLOBALS['TMP'], $prefx.'_')))) {
		if (!copy($source, $name))
			return;
	}


Sort of negates the whole point of move_uploaded_file so I'm more than willing to take advice here.

HOWEVER - that then leads to my latest stumbling block. Now the avatar will not copy to the custom_avatars folder - I always get this error:

Warning: copy(D:\Work\PHP\egroupware/fudforum/3814588639/images/custom_avatars/) [function.copy]: failed to open stream: Permission denied in D:\Work\PHP\egroupware\fudforum\3814588639\theme\default\register.php on line 1657

(Please ignore the line number poss not corresponding to yours - I've got loads of echos in there to try to work out what's going wrong)

The offending line is this one:
copy($TMP . basename($common_av_name), $WWW_ROOT_DISK . $av_path);


My echo statements tell me this:
- The source file exists
- The target folder exists

I have also successfully been able to copy it to a file name generated by tempnam($GLOBALS['TMP'], $prefx.'_').

The Apache process runs under the windows SYSTEM account and this has full control access to the custom_avatars folder. I have even run SysInternals FileMon and this shows no permission problems from the OS side.


But now I'm completely stuck. I'm pulling my hair out and would greatly appreciate some help. Apologies for the long post.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Only the rights to create new forums
Next Topic: Restoring FUDforum Fails
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 06:57:05 GMT 2024

Total time taken to generate the page: 0.04607 seconds