4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: webmaster73 on August 09, 2007, 02:39:55 AM

Title: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['image_
Post by: webmaster73 on August 09, 2007, 02:39:55 AM
hello.

After a lot of painful research and trial and error, I found out that when the Image Name field is in non-ascii chars, the upload fails (captcha deactivated in global.php)

After additional painful research, found out that this problem could be avoided by replacing the 4 occurences of $HTTP_POST_VARS['image_name'] in member.php by $_POST['image_name']

Now I also found out that users are not able to use non-ascii chars in comment title..... grrrh.

I searched details.php for any occurences of $HTTP_POST_VARS['image_name'], but there were none.

Any solution?


Linux server RedHat 9 PHP 5 mysql 4 Cpanel 11 4images1.7.4 latest.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 02:44:46 AM
Intrst ... which line in member.php for $HTTP_POST_VARS['image_name'] ? May be bug for pre-define.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 02:48:06 AM
Ok, found it.

In member.php file,

find (2 time):

Quote
$image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
$image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));

replace:

Quote
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'])) : "";
$image_description = (isset($HTTP_POST_VARS['image_description'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'])) : "";
$image_keywords = (isset($HTTP_POST_VARS['image_keywords'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords'])) : "";

Should work. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 02:53:50 AM
Intrst ... which line in member.php for $HTTP_POST_VARS['image_name'] ? May be bug for pre-define.

4 occurences.

line 343    $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));

twice on line 430   $image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(stripslashes(trim($HTTP_POST_VARS['image_name']))) :

line 495    $image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));


am attaching both files.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 02:57:27 AM
No get .. I only two ...  :|

Use my diagnostic:

http://www.4homepages.de/forum/index.php?topic=18308.0

Set:

Quote
// Assistance
... image_name line
// End of assistance

in member.php file for all 4 and send attach file. Will look. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 03:02:31 AM
Ok, found it.

In member.php file,

find (2 time):

Quote
$image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
$image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));

replace:

Quote
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'])) : "";
$image_description = (isset($HTTP_POST_VARS['image_description'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'])) : "";
$image_keywords = (isset($HTTP_POST_VARS['image_keywords'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords'])) : "";

Should work. ;)


No friend, sorry. it does not work.

when I enter non-ascii (arabic) chars into the image name field, I get this error:

Please fill out the Image Name field

which of course I did.....


any help would be appreciated.

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 03:03:27 AM
No get .. I only two ...  :|

Use my diagnostic:

http://www.4homepages.de/forum/index.php?topic=18308.0

Set:

Quote
// Assistance
... image_name line
// End of assistance

in member.php file for all 4 and send attach file. Will look. ;)

 :D :D :D :D I was faster than you .....   I attached before you requested..  :mrgreen: :mrgreen:
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 03:05:36 AM
AND ......

to confirm to you that it is an absolutely Image Name problem, with the same user, same time, same system, same browser, I upload the same image, only difference being that I would use ascii/ansi chars for file name, and upload is successful....

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 03:22:59 AM
Still find some line of this:

Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

No pre-define. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 12:50:58 PM
oooooooooooh. disappointing.

even members with non-ascii chars in their names are not able to log-in and they receive no error message whatsoever...

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 02:46:55 PM
Do final change from my post top of your ?
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 03:18:51 PM
Still find some line of this:

Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

No pre-define. ;)

forgive me, but I don't understand what you mean.

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 06:03:38 PM
this:

Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

to:

Quote
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS['image_name'])) : "";

;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 06:42:29 PM
this:

Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

to:

Quote
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'])) : "";

;)


I could not find this string anywhere in the whole script.
Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

so in which file we are talking about here, member.php or details.php or what ?


Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 08:11:06 PM
Quote
member.php

If no find, download ZIP package this site and compare. Reason for problem.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 08:59:28 PM
No do thing with member.php file ... you say line you can fin ... compare with ZIP file. Is in.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 09:35:31 PM
How many $HTTP_POST_VARS['image_name'] line have ?
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 09, 2007, 09:57:16 PM
this line is not in 4images

this three line is original
$image_name = un_htmlspecialchars(trim($HTTP_POST_VARS['image_name']));
$image_description = un_htmlspecialchars(trim($HTTP_POST_VARS['image_description']));
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));

and when replace to this lines
$image_name = (isset($HTTP_POST_VARS['image_name'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_name'])) : "";
$image_description = (isset($HTTP_POST_VARS['image_description'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_description'])) : "";
$image_keywords = (isset($HTTP_POST_VARS['image_keywords'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords'])) : "";


is the same error



thank you. I was frustrated. now you reassured me

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 10:00:12 PM
See careful from top when post 3 diff lines (343, 430, 495) - diff is.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 10:20:18 PM
Me or webmaster73 ? Please quote. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 09, 2007, 10:24:07 PM
Like say ... compare original member.php of ZIP of site ...
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 10, 2007, 06:03:25 AM
Still find some line of this:

Quote
$image_name = un_htmlspecialchars(trim($_POST['image_name']));

No pre-define. ;)

on a freshly downloaded copy of the 4images script, ultraedit32 search in the whole directory, in *.* file types:
Search complete, found '$image_name = un_htmlspecialchars(trim($_POST['image_name']));' 0 time(s). (0 file(s)).



on a freshly downloaded copy of the 4images script, editplus search in the whole directory, in *.* file types:
---------- Find in Files ----------
0 occurrences have been found.
Output completed (0 sec consumed)

in frontpage of Office, find in source code: 0 occurences.

tell me on which line of the member.php you find this string:
$image_name = un_htmlspecialchars(trim($_POST['image_name']));




Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 10, 2007, 01:12:47 PM
Quote
ultraedit32

Try totaledit or notepad. Will find from member.php. I use ultraedit32 in past, not right search function in program. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 10, 2007, 01:44:46 PM
Quote
ultraedit32

Try totaledit or notepad. Will find from member.php. I use ultraedit32 in past, not right search function in program. ;)

4) WordPad. did not find $image_name = un_htmlspecialchars(trim($_POST['image_name'])); in member.php

5) NotePad. did not find $image_name = un_htmlspecialchars(trim($_POST['image_name'])); in member.php


enough ?

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 10, 2007, 01:52:16 PM
No see for isset in line . . .
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 10, 2007, 02:10:29 PM
No see for isset in line . . .

 :lol:I have lost a lot of time trying to fix the failings of the script, but this is exactly what I should be expecting for a free script.

(someone said you only get what you paid for? so we are paying nothing here, and thus.... )

I sincerely regret that such an intelligent team as 4images' produce a script in 2007 which considers non-ascii image names as "missing" and gives an error such as "fill-in Image Name" Back in 1987, that would have been forgiven. but 20 years later, no, this is disappointing.

If the 4images team is not willing to handle the bugs and errors we painstakingly discover by multiple try and error and hours spent trying.....  then I will have to go and find a better script where the coders care a bit more .... look at vbulletin.... you pay $160 to get it, but you get real service afterwards.. ;)

Having searched with 5 different programs for the text string thunderstrike is directing me to, is enough for a user.

It is up to the 4images team now to come up with a solution......
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 11, 2007, 12:57:57 AM
Can use my diagnostic tool:

http://www.4homepages.de/forum/index.php?topic=18308.0

to reduce search when need help in future. Is wy is there. ;)
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 11, 2007, 01:20:16 AM
Can use my diagnostic tool:

http://www.4homepages.de/forum/index.php?topic=18308.0

to reduce search when need help in future. Is wy is there. ;)


I would really like to, but to be honest with you, I did not understand how your tool works.

you know thunderstrike, people like me who speak english as a second or third language are not that good at understanding plain written text if it does not correspond to the english we learned in books.

I confess to you that I often have difficulty to understand what you mean.

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 11, 2007, 01:21:32 AM
Quote
you know thunderstrike, people like me who speak english as a second or third language are not that good at understanding plain written text if it does not correspond to the english we learned in books.

I confess to you that I often have difficulty to understand what you mean.

Is this right ? Very good - offlist!
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: webmaster73 on August 11, 2007, 01:23:52 AM

Is this right ? Very good - offlist!

this is a good example thunder.... I don't understand here what you mean by "offlist".

Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: Klementina on August 14, 2007, 07:44:03 AM
I think I have a same problem with russian language: no comments in russian and no search by keywords. But in 1.7.2 version it's OK. Help, please.
Title: Re: non-ascii chars in image name or file name or comments - $HTTP_POST_VARS['im
Post by: thunderstrike on August 14, 2007, 01:05:41 PM
If v1.7.2 ok, use compare tool - winmerge or beyond compare 2 with 4images v1.7.4 to see prob is.