Home »
FUDforum Development »
Bug Reports »
Avatar uploading - missed extensions
|
|
Re: Avatar uploading - missed extensions [message #31387 is a reply to message #31382] |
Thu, 20 April 2006 07:15 |
alexeik
Messages: 4 Registered: April 2006 Location: SPb, Russia
Karma: 0
|
Junior Member |
|
|
PHP Version 4.3.3
No file extensions on disk aswell.
After selecting avatar file on my computer and click "preview"
I got this code
<tr class="vt RowStyleA"><td>Файл с картинкой: <br /><span class="ErrorText">Указанная вами ссылка URL не содержит картинки</span></td><td><table border=0 cellspacing=0 cellpadding=0><tr><td><img src="index.php?t=tmp_view&img=691.__0opmGk" width="72" height="28" /></td><td> <input type="submit" class="button" name="btn_detach" value="Удалить картинку"></td></tr></table></td></tr>
<input type="hidden" name="avatar_tmp" value="NjkxLl9fMG9wbUdrCjAKMA==">
[Updated on: Thu, 20 April 2006 07:41] Report message to a moderator
|
|
|
|
|
|
Re: Avatar uploading - missed extensions [message #31448 is a reply to message #31424] |
Mon, 24 April 2006 09:00 |
alexeik
Messages: 4 Registered: April 2006 Location: SPb, Russia
Karma: 0
|
Junior Member |
|
|
Ok, I've solved the problem
changing register.php code to this
if (DIRECTORY_SEPARATOR == '/')
{ /* *nix */
$ext = array(1=>'gif', 2
=>'jpg', 3=>'png', 4=>'swf');
$img_info = getimagesize($TMP . $common_av_name);
$av_path = 'images/custom_avatars/'.substr($common_av_name, 0, strpos($common_av_name, '_')).$ext[$img_info[2]];
} else {
i.e. $av_path = 'images/custom_avatars/'.substr($common_av_name, 0, strpos($common_av_name, '_')).$ext[$img_info[2]];
have been missing file extensions
but now i afraid that after forum update this will not work again.
|
|
|
Re: Avatar uploading - missed extensions [message #31510 is a reply to message #31448] |
Tue, 02 May 2006 02:05 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I think the problem lies with the tempnam() function on your system.
Can you try the following bit of code:
<?php var_dump(
tempnam("/tmp/", "foo.gif__")
); ?>
FUDforum Core Developer
|
|
|
Goto Forum:
Current Time: Fri Jan 24 15:45:01 GMT 2025
Total time taken to generate the page: 0.02318 seconds