|
|
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo
|
|
Can't upload avatar...Unable to upload |
Autor |
Wiadomość |
boy ms
Posty: 18
|
Wysłany: 19-09-2006, 08:30 Can't upload avatar...Unable to upload
|
|
|
Hello, I've a problem....when I want to upload avatar it write:
Unable to upload file
I've configured all things which I need (CHMOD 777 for directiories with avatars, avatar size etc.)
I don't know where is the problem because Photo and Signature uploading run good
Thanks boy ms |
|
|
|
 |
Gadatliwa Kasia
|
|
|
|
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 19-09-2006, 10:42
|
|
|
Your forum has open_basedir and safe_mode restriction turned on. Probably there is a problem, but I'm not sure.
Could you paste entire error message including filename and line number? |
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 19-09-2006, 11:04
|
|
|
chelloPL napisał/a: | Your forum has open_basedir and safe_mode restriction turned on. Probably there is a problem, but I'm not sure.
Could you paste entire error message including filename and line number? |
Yes, I have safe_mode and open_basedir turned on!
No, it write only this... |
|
|
|
 |
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 19-09-2006, 11:30
|
|
|
boy ms napisał/a: | No, it write only this... |
Are you sure? Generally you should got something like this:
Kod: | Unable to upload file
DEBUG MODE
Line : 315
File : usercp_avatar.php |
The same error message is generated in 2 different lines in the same file - I don't know which error you have. |
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 19-09-2006, 11:37
|
|
|
chelloPL napisał/a: | boy ms napisał/a: | No, it write only this... |
Are you sure? Generally you should got something like this:
Kod: | Unable to upload file
DEBUG MODE
Line : 315
File : usercp_avatar.php |
The same error message is generated in 2 different lines in the same file - I don't know which error you have. |
Yes, I am sure....it write only this sentence: Unable to upload file...
No more, no debug mode.... |
|
|
|
 |
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 19-09-2006, 11:42
|
|
|
Ok - edit includes/usercp_avatar.php and change first line:
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); |
to:
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file (1)', '', __LINE__, __FILE__); |
and second
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); |
to:
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file (2)', '', __LINE__, __FILE__); |
Then try to generate again this error and tell me is it "(1)" or "(2)" error |
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 19-09-2006, 12:16
|
|
|
So I try it - it is (1) |
|
|
|
 |
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 19-09-2006, 14:03
|
|
|
Ok - I think there is a problem in server configuration.
Could you create file (attach_check.php) with the following content?
Kod: |
<?php
$getini = ini_get;
function test($var)
{
global $getini;
echo "$var = " . $getini($var) . "<br>\n";
}
test('open_basedir');
test('upload_tmp_dir');
test('safe_mode');
test('safe_mode_exec_dir');
?>
|
Try to upload this file via FTP. Then execute this script http://your_forum/attach_check.php and paste here the result.
I think that open_basedir is set to your server homedir, upload_tmp_dir is set to "/tmp" (by default) and script doesn't have an access to uploaded file. |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 19-09-2006, 21:08
|
|
|
Here is result:
Kod: | open_basedir = /web/virtcars.com
upload_tmp_dir = /web/virtcars.com/tmp
safe_mode = 1
safe_mode_exec_dir = /web/virtcars.com |
|
|
|
|
 |
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 19-09-2006, 22:43
|
|
|
Ok - server configuration is rather correct.
Change
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file (1)', '', __LINE__, __FILE__); |
to:
Kod: | message_die(GENERAL_ERROR, 'Unable to upload file (1): '."avatar_mode=$avatar_mode, avatar_filename=$avatar_filename, avatar_realname=$avatar_realname, tmp_filename=$tmp_filename, type=$type, imgtype=$imgtype, width=$width, height=$height", '', __LINE__, __FILE__); |
And paste error message uploading an avatar. |
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 20-09-2006, 07:55
|
|
|
Here is the error
Kod: | Unable to upload file (1): avatar_mode=local, avatar_filename=/web/virtcars.com/tmp/php4nIKVY, avatar_realname=ip.jpg, tmp_filename=, type=, imgtype=.jpg, width=0, height=0 |
|
|
|
|
 |
iceangel

Pomógł: 6 razy Posty: 55
|
Wysłany: 20-09-2006, 11:00
|
|
|
I have the same problem with avatars. This is my result
Kod: | open_basedir = /home/koszatni/:/tmp:/tmp/:/var/www/:/usr/local/lib/php/:/usr/share/locale/:/usr/bin/:/etc/virtual/
upload_tmp_dir =
safe_mode = 1
safe_mode_exec_dir = |
What can I do with this? |
|
|
|
 |
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 20-09-2006, 22:33
|
|
|
boy ms, it looks like getimagesize() function is not working.
You could remove "@" sign before
Kod: | list($width, $height, $type) = @getimagesize($avatar_filename); |
but this will not fix an error. Maybe any additional error will be printed (on screen or in apache error_log) and will explain why this function is not working. |
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
boy ms
Posty: 18
|
Wysłany: 21-09-2006, 09:37
|
|
|
chelloPL napisał/a: | boy ms, it looks like getimagesize() function is not working.
You could remove "@" sign before
Kod: | list($width, $height, $type) = @getimagesize($avatar_filename); |
but this will not fix an error. Maybe any additional error will be printed (on screen or in apache error_log) and will explain why this function is not working. |
Ok, where should I add this code? |
|
|
|
 |
Gadatliwa Kasia
|
|
|
|
chelloPL


Pomógł: 413 razy Posty: 2544
|
Wysłany: 21-09-2006, 12:16
|
|
|
Not add. Find this line in includes/usercp_avatar.php
and replace it with:
Kod: | list($width, $height, $type) = getimagesize($avatar_filename); |
|
_________________ Zanim napiszesz do mnie na GG/PW, koniecznie przeczytaj zasady.
Sygnaturka to nie tablica z ogłoszeniami! PAMIĘTAJ o tym! Nadużywanie i celowe reklamowanie stron jest ZABRONIONE i karalne!
Gość, a czy Ty nie masz sobie nic do zarzucenia? |
|
|
|
 |
|
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach Możesz załączać pliki na tym forum Możesz ściągać załączniki na tym forum
|
Dodaj temat do Ulubionych Wersja do druku
|
Kopiowanie wszelkich treści zawartych na forum, modyfikacji oraz instrukcji bez zgody administracji i autorów tematów/postów zabronione!
Powered by phpBB modified by Przemo © 2003 phpBB
| Strona wygenerowana w 0,11 sekundy. Zapytań do SQL: 12 | |
 |
|