|
Joined: Oct 2006
Posts: 128
member
|
member
Joined: Oct 2006
Posts: 128 |
Hello, one of my members uploaded a photo on one of his posts. The photo showed up fine in FF but when I checked it out in IE6 it had a box with a red x. I used ftp to go in and see what the file name was. FTP says it's an invalid file name. It won't even let me change the name or delete it. The file name is Dan\'s8lb.3.jpg. I'm assuming the "\" is screwing things up. As a solution, I copied the pic in FF and then changed the name and then deleted and uploaded the newly named pic back into his post.
I'm just wondering if there is a way to avoid these invalid file names from being uploaded with a message letting the user know why? This is probably a very unusual case. I don't know why anyone would name their pic with a \ in the name. It was probably a typo on his part.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I think that'd be the php function "addslashes"; it should actually link the photo as the name with the slash in general but then again IE is likely thinking that the / is a directory... What i'm thinking is that when Rick set things up he was planning to use stripslashes but neglected to update the file manager to strip them when the file was written to the browser... Nto entirely sure though, will have to wait on rick...
|
|
|
|
Joined: Aug 2006
Posts: 1,649 Likes: 1
Pooh-Bah
|
Pooh-Bah
Joined: Aug 2006
Posts: 1,649 Likes: 1 |
Unfortunately it's not that unusual for general users to name files with punctuation and spaces :/ But yeah, as for the slash, what Gizmo said.
GangsterBB.NET (Ver. 7.6.1.1) PHP Version 5.6.40 / MySQL 5.7.23-23 (was 5.6.41-84.1) / Apache 2.4.54 2007 Content Rulez Contest - Hon Mention UBB.classic 6.7.2 - RIP
|
|
|
|
Joined: Oct 2006
Posts: 128
member
|
member
Joined: Oct 2006
Posts: 128 |
I wonder if Rick got a chance to take a look at this?
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I wonder if Rick got a chance to take a look at this? I'm sure he'll get to it, lots of posts and lots of coding and all
|
|
|
|
Joined: Jun 2006
Posts: 3,837
Carpal Tunnel
|
Carpal Tunnel
Joined: Jun 2006
Posts: 3,837 |
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I fed him after midnight and threw water on him, but nothing happened...
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
That's the one thing I dislike about PHP is that in it's efforts to be beginner friendly it adds in all these options that I despise, like the magic_quotes stuff.
I'll get this fixed up for the next beta.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Rick, why not utilize iniset?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
We do a few things to try and get around this, like turning off magic_quotes_runtime and a couple other checks when retrieving the data, but it's still somewhat inconsistent depending on how the server is setup.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
but it's still somewhat inconsistent depending on how the server is setup. True, let us root for PHP6, where there will be no option to turn on several bad options
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
4 members (Gizmo, Ruben, Baldeagle, 1 invisible),
704
guests, and
152
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|