Re: I can't upload any avatars in my site
I just closed it 5 min.
So cannot I still upload avatar?
You can also visit Chita, a site built by me, a feral paradise for feline animals.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → I can't upload any avatars in my site
I just closed it 5 min.
So cannot I still upload avatar?
What?
Frank H wrote:disable avatars until the host answers?
I've tried, there's still the problem.
You need to disable it in admin->options=="Use avatars" to "No", not in your profile
You need to disable it in admin->options=="Use avatars" to "No", not in your profile
...
I disabled it in Admin, not my profile OK? Why do you all think it's my problem?
OK, the problem has been solved. It's due to PHP's "Safe Mode". My friend called the host yesterday, and they disabled "Safe Mode" just now. I can upload now.
Frank H wrote:You need to disable it in admin->options=="Use avatars" to "No", not in your profile
...
I disabled it in Admin, not my profile OK? Why do you all think it's my problem?
You said you disabled uploading avatars but still got the error, Frank was simply making sure you actually disabled avatars so people would get the correct error (That avatars were disabled).
OK, the problem has been solved. It's due to PHP's "Safe Mode". My friend called the host yesterday, and they disabled "Safe Mode" just now. I can upload now.
Yes, that's what we've been saying, open_basedir is a part of PHP's safe mode settings
The real mystery here is how the hell her phpbb installation supported avatar uploads
I'm curious, but not curious enough to dig through the code
Edit: I did find this though
2.5.2: Safe Mode
phpBB 2.0 RC-4 introduced support for uploadable avatars on systems running PHP in safe mode. If this applies to your hosting service, you will need to create a sub-directory called tmp in the directory you specified for storage of uploaded avatars (by default this is images/avatars as explained above). Give it the same access rights as for uploadable avatars above. This safe mode support includes compatibility with various directory restrictions that your host may impose (assuming they are not too restrictive and that the PHP installed is version 4.0.3 or later). There is generally no need for any manual setup for safe mode support because it is typically handled transparently (although PHP 3 users may run into difficulties).
I'll see what I can determine
Edit2: Unless I'm reading wrong, I think they don't really get around the issue. What they have you do is upload the avatar elsewhere and then give the forum the URL. The forum then downloads the file to its own tmp folder and checks it before making it an avatar. There's no magic
So has there been any updates or changes based on this thread? I'm new to Pun and have encountered the same issues. Has anyone written a mod or a quick update to allow users to specify the TMP location?
Also for clarification my issues is NOT related the permissions on the img/avatar directories and it is NOT related to php safe mode (which is off). So based on what I've read from everyone else, this is related to the default tmp directory PHP uses. If I can't get my host to change the permission on that directory, I'll not be able to use avatars. Kind of sad...
So I'd love to find a work-around since it seems as if many people have experienced similar issues.
Thanks.
-dt
So has there been any updates or changes based on this thread? I'm new to Pun and have encountered the same issues. Has anyone written a mod or a quick update to allow users to specify the TMP location?
Also for clarification my issues is NOT related the permissions on the img/avatar directories and it is NOT related to php safe mode (which is off). So based on what I've read from everyone else, this is related to the default tmp directory PHP uses. If I can't get my host to change the permission on that directory, I'll not be able to use avatars. Kind of sad...
So I'd love to find a work-around since it seems as if many people have experienced similar issues.
Thanks.
-dt
It actually hasn't been that big of an issue. I'll look into it again though
Edit: It looks like upload_tmp_dir can't be specified with .htaccess or ini_set
OK, try this
FIND
if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
REPLACE WITH
if (!@copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
And if that doesn't work, do the following:
FIND
if (!@copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
REPLACE WITH
if (!copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
Paste me the errors you get
FIND
if (!copy($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
REPLACE WITH
if (!move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
Paste me the errors you get
PunBB Forums → PunBB 1.2 troubleshooting → I can't upload any avatars in my site
Powered by PunBB, supported by Informer Technologies, Inc.