Topic: I can't upload any avatars in my site

I uploaded a small avatar, and I've edited img/avatar to "777". Here is still the sentence:

The server was unable to save the uploaded file. Please contact the forum administrator at xxxxxxxxx@gmail.com.

I've tried many ways from this forum to solve, but it's still in vain. Would anyone like to help me?

My site is Chita, the link: http://chita.us

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

2

Re: I can't upload any avatars in my site

try setting the directory to 755 and see what it says.

Re: I can't upload any avatars in my site

Same response.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

4

Re: I can't upload any avatars in my site

have you got them enabled in admin > options?

Re: I can't upload any avatars in my site

Is the server using PHP in safe_mode?
(the attachment mod doesn't work with it on, the installation script cannot copy a file and stops, even though the chmod is correct on the directories)

6

Re: I can't upload any avatars in my site

Frank H wrote:

Is the server using PHP in safe_mode?
(the attachment mod doesn't work with it on, the installation script cannot copy a file and stops, even though the chmod is correct on the directories)

he's trying to do avatar though no atachments =/

7 (edited by Frank H 2006-09-17 10:56)

Re: I can't upload any avatars in my site

I know, but it's about file handling on both, and that the chmod was correct
the exact phenomen happens in the attachment mod, the chmod is correct but it still fails, and it's due to PHP beeing in safe_mode

8

Re: I can't upload any avatars in my site

ahh i understand smile

Re: I can't upload any avatars in my site

In same server, there is also a forum called CatCollection which uses phpBB, its fuction of uploading avatars is fine.

By the way, I'm a female student.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: I can't upload any avatars in my site

I searched for "avatar" on the troubleshooting forum ... this came up

http://punbb.org/forums/viewtopic.php?id=12035

Also found is that phpBB uses links for avatars, and if you're using PunLA, then there's a miss in the modifications they've done to that ...

11 (edited by Smartys 2006-09-17 11:36)

Re: I can't upload any avatars in my site

Well, that error comes from here:

if (!@move_uploaded_file($uploaded_file['tmp_name'], $pun_config['o_avatars_dir'].'/'.$id.'.tmp'))
     message($lang_profile['Move failed'].' <a href="mailto:'.$pun_config['o_admin_email'].'">'.$pun_config['o_admin_email'].'</a>.');

Try removing the @ and see what error you get

Re: I can't upload any avatars in my site

I've tried the ways in the page. The problem is still alive.

No, we can also upload avatars in phpBB.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: I can't upload any avatars in my site

I've removed @, and here is the error message:

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpuG0pYo) is not within the allowed path(s): (/home/www/webs/redcat/cc/chita/) in /home/www/webs/redcat/cc/chita/profile.php on line 365

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpuG0pYo) is not within the allowed path(s): (/home/www/webs/redcat/cc/chita/) in /home/www/webs/redcat/cc/chita/profile.php on line 365

Warning: move_uploaded_file(/tmp/phpuG0pYo) [function.move-uploaded-file]: failed to open stream: Operation not permitted in /home/www/webs/redcat/cc/chita/profile.php on line 365

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpuG0pYo' to 'img/avatars/33.tmp' in /home/www/webs/redcat/cc/chita/profile.php on line 365
Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: I can't upload any avatars in my site

you probably need to ask your host: "File(/tmp/phpuG0pYo) is not within the allowed path(s): (/home/www/webs/redcat/cc/chita/)", seems they've restricted what files you may access...

Re: I can't upload any avatars in my site

I've sent an email to him.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: I can't upload any avatars in my site

Is there any other way to solve? He's too busy to read emails.

Welcome to my WoW guild site, the Eternal Reach.

You can also visit Chita, a site built by me, a feral paradise for feline animals.

Re: I can't upload any avatars in my site

turn off avatars until he has time to answer I suppose will remove the errors ...

Re: I can't upload any avatars in my site

If you know php/sql you ~could~ write a mod to upload the files to the database, and then a php script to return the data as an img

echo "deadram"; echo; fortune;

Re: I can't upload any avatars in my site

That's quite annoying =/

Just install the remote avatar mod...

Re: I can't upload any avatars in my site

deadram wrote:

If you know php/sql you ~could~ write a mod to upload the files to the database, and then a php script to return the data as an img

I believe that's untrue, since the uploaded data still would be stored in /tmp (which is apparently inaccessible)

Re: I can't upload any avatars in my site

If people can "post data" you can set the avatar submission form to a certain type of data, I forget the name, but what is sent to the server ends up looking like an attachment from an e-mail. Then with a php function you decrypt it (At least I know perl has that ability, php should too). Finally, you send that data to the database. /tmp is never touched, unless the host has done some serious editing of their httpd servers source code.

echo "deadram"; echo; fortune;

Re: I can't upload any avatars in my site

All uploaded files get sent to a temp folder. If the user has no access to it, he's screwed.

23 (edited by deadram 2006-09-18 01:58)

Re: I can't upload any avatars in my site

http://www.w3.org/TR/REC-html40/interac … ef-enctype

<form action="blah" method="post" enctype="multipart/form-data">
<!-- blah -->
<input type="file" ...>

That should upload the file in the post data, and not to a temporary location, as far as I know anyways... But I suppose I could be wrong... It be the first time big_smile lol tongue

EDIT --

http://www.ietf.org/rfc/rfc2388.txt

Looks like the specs specify what the httpd app can do with that data... it has to go to the perl script in the same way that a multi-part e-mail message would show up in telnet. I'm unsure how php handles this, but i'm assuming it's the same thing. If something ends up in tmp, it's probably due to the way profile.php and/or php stores that data, and very litle to do with the w3 specs.

EDIT --

Hummm, found this:
http://www.thescripts.com/forum/thread925.html looks like php uses tmp for the FILES variable...

Might have to use something with power server side, like perl... I really wish php was just perl with ?> substituted as END; and <?php substituted as print <<END... but such is life...

Lemme see if there's a way to "bypass" the FILES variable...

EDIT --

"http://ca.php.net/wrappers.php wrote:

php://input allows you to read raw POST data. It is a less memory intensive alternative to $HTTP_RAW_POST_DATA and does not need any special php.ini directives. php://input is not available with enctype="multipart/form-data"

Hurm... almost there... gimme a few more...

echo "deadram"; echo; fortune;

Re: I can't upload any avatars in my site

http://us2.php.net/manual/en/features.file-upload.php
No, there's no way to bypass $_FILES, that's the way uploads are handled

And hoping PHP is exactly like Perl is a bit silly: they're two different languages tongue

Of course, upload_tmp_dir might be able to be changed through php.ini or through .htaccess (depends on the host which, if any, options are avaliable). I'd change it to somewhere the user has control over tongue

Re: I can't upload any avatars in my site

Looks like your right Smartys... you'd have to use cgi Meowmeow, but with the cgi you ~could~ still access all them php objects by calling a php script from the cgi script and setting up the argvs ' with the raw multi-part form data... then the php script to access all them pun variables and functions to complete the upload... ;p

echo "deadram"; echo; fortune;