Uploading file - Greek characters in filename (1 viewing) (1) Guest
 | | |
|
TOPIC: Uploading file - Greek characters in filename
|
|
Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 0
|
|
Hi
I’m new to OWL and have been messing with it for the passed days. My test environment is a windows xp sp2 pc with IIS, mysql 5.1 and php 5.2.10.
The problem occurs when I’m trying to upload a file with Greek characters in it’s filename. This is what I’ve done so far.
A) UTF-8 used in php.ini, owl.php, mysql, language.inc , db_mysql.inc (set names and set characters).
All characters stored in sql are becoming funny and so if the filename of the uploaded file that resides in the Document folder.
I added the greek characters in owl.php $default->list_of_valid_chars_in_file_names and the data stored in mysql is now shown properly but I still have the problem with the filename stored in the document folder.
B) (windows-1253 or iso-8859-7) in php,.ini, owl.php(with the added characters), language.inc and greek in db_mysql.inc.
Everything is stored as it should be but when I’m downloading the file I’m getting [1].doc instead of (something in greek).doc. This happens with longer filenames as well.
Any suggestions would be appreciated
|
|
|
|
Last Edit: 2009/09/19 00:30 By giorgio.
Giorgio
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 28
|
|
Hi,
I would try to remove / comment out the following 2 lines from the phplib/db_mysql.inc file, and then restarting Mysql and Apache...
@mysql_query("SET NAMES 'utf8';", $this->Link_ID);
@mysql_query("SET CHARACTER SET 'utf8';", $this->Link_ID);
B0zz
|
|
|
|
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 0
|
|
Hi,
I've tried that and the result is worse. The file is still stored with uncoprehensive characters in the document folder and it messes up the sql data as well. I'm using IIS instead of Apache, but i don't think that this is the problem cause up to now everything was ok.
I'm sticking in my first configuration (all setiings conserning chasets set to UTF-8) and i'm trying to figure out which script has the function (and the name of the function) for copying the uploaded file to the servers HD but without luck. The idea is to convert the string from utf-8 to iso-8859-7. Any ideas?
P.S. I love the application and i'm willing to translate it to greek
|
|
|
|
Giorgio
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 28
|
|
dbmodify.php is what does the work.... of moving the file from the tmp directory to the Documents Directory.
move_uploaded_file() PHP function is the one doing the moving... but there's Manipulation of the Destination filename based on the characters you put in the owl.php file.
Yes Greek Translation would be nice, but before you start let me know, and I'll send you the English for 1.00a, and avoid having to retranslate when that version is released to the Open Source Community in January...
Regards,
B0zz
|
|
|
|
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 0
|
|
Problem solved. I used the second configuration (where all charset (owl scripts and php.ini) and db are set to greek windows-1253) and overcame the problem with the empty url download link by adding "$download_name = iconv('windows-1253', 'UTF-8', $download_name);" in line 338 of the download script.
Trying to find a workaround for the description (no greek characters displayed).
You can send me the language file as soon as possible since i was planning to start translating v0.96 next week.
Best Regards
|
|
|
|
Giorgio
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 3 Weeks ago
|
Karma: 28
|
|
Hi,
Emailed you the English Locale from my current version.
B0zz
|
|
|
|
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 2 Weeks ago
|
Karma: 0
|
|
Hi,
I'm working on the translation but now i've come to another problem. When i'm using the "set security policy now" feature during the upload i'm getting a "CGI Timeout" dbmodify.php page. This happens only to certain files (not filetypes). Turning the debuging on in both php.ini and owl.php didn't give any information. The log from IIS gives:
2009-09-24 06:10:07 192.168.2.2 GET /owl-0.96/modify.php 200
2009-09-24 06:15:14 192.168.2.2 POST /owl-0.96/setacl.php 502
Any ideas on what's happening?
Thanks in advance
|
|
|
|
Giorgio
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 2 Weeks ago
|
Karma: 28
|
|
Not sure, this is the first I hear of this issue...
Timeout would indicate that the script is taking to long, but without been able to reproduce here, and debugging it hard to tell.
If remote desktop possible I could attempt to debug on your box?
B0zz
|
|
|
|
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 2 Weeks ago
|
Karma: 0
|
|
Unfortunately my test server is offline.
I didn't find out what the problem is but most probably it has to do with IIS.
Using the same owl configuration with xampp 1.72 (php 5.3) sovled that problem but i couldn't get any greek characters in both sql data and the saved filename in the file system.
With xampp 1.7.1 (php 5.2.9) works everything fine. I guess I'll have to tighten up the security in XAMPP and and forget about IIS.
Thanks for your time
|
|
|
|
Giorgio
|
|
|
Re:Uploading file - Greek characters in filename 11 Months, 2 Weeks ago
|
Karma: 28
|
|
Pleasure, and thanks for letting me know.
B0zz
|
|
|
|
|
|
|
 | | |
|
|
|