From: Manolis Vlachakis on
hallo there everyone!
i am uploading a file in a php applet i developed and i face a problem
while i upload greek named files..
have no problem with the english or so on files...
is there a way to use iconv or something else so as to solve my problem ?
my code looks like that...


$uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/****
/****/public_html/uploads/';
$file = $uploaddir . basename($_FILES['uploadfile']['name']);
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
echo "success";
} else {
echo "error";
}



thanx

--
Manolis Vlachakis

Nelly's Family Hotel
Visit : www.nellys-hotel.gr
www.nellys.gr
Skype : manolis.vlachakis
From: Ashley Sheridan on
On Thu, 2010-05-27 at 17:49 +0300, Manolis Vlachakis wrote:

> hallo there everyone!
> i am uploading a file in a php applet i developed and i face a problem
> while i upload greek named files..
> have no problem with the english or so on files...
> is there a way to use iconv or something else so as to solve my problem ?
> my code looks like that...
>
>
> $uploaddir = $_SERVER['DOCUMENT_ROOT'] . '/****
> /****/public_html/uploads/';
> $file = $uploaddir . basename($_FILES['uploadfile']['name']);
> if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file)) {
> echo "success";
> } else {
> echo "error";
> }
>
>
>
> thanx
>


I assume that the file upload works with other files?

Firstly, what is the filesystem that you're using, and the operating
system. Windows filesystems are very limiting on what characters you can
use.

If you have it working with another file, have you tried renaming that
to use characters which you think are causing the problems?

Lastly, what exactly is the error code returned from the $_FILES array?

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: Ashley Sheridan on
On Thu, 2010-05-27 at 18:03 +0300, Manolis Vlachakis wrote:

> i am using gentoo
>
> and on the server side i cant see either the files with their greek
> names
> but i had no problem in the past handling them even though
> i couldn't see them...
>
>
> my servers log say that they uploaded the file but no
> error occurred...
> is there another way to upload a file with that script or i should try
> to find something else to solve my problem....

[/SNIP]

>
>
> --
> Manolis Vlachakis
>
> Nelly's Family Hotel
> Visit : www.nellys-hotel.gr
> www.nellys.gr
> Skype : manolis.vlachakis
>

Gentoo I believe uses the ext3 filesystem by default, which should be
perfectly capable of handling Greek characters.

What happens when you upload a normal small file now with non-Greek
characters and see what happens? Does that upload correctly?

Output the $_FILES array and look to see if the error code is anything
other than 0. If it is, that means there's a problem with the upload,
which probably won't show on the server log.

Thanks,
Ash
http://www.ashleysheridan.co.uk