ghourisalman85 / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Working with tilde in URLs #263

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Many developers work on web environments that include a tilde in the URL. For 
example: http://127.0.0.1/~website

The preg_match functions that deal with URL do not allow the tilde (~). Adding 
this support will fix many user's issues when using this script.

Original issue reported on code.google.com by chadhunt...@gmail.com on 9 Sep 2011 at 1:45

GoogleCodeExporter commented 8 years ago
We also get many request from people that use temporary domains with tilde.
TimThumb version 1.x could work in this situation. Is it possible to allow 
tilde in url in the current 2.x version?

Original comment by bes...@gmail.com on 9 Sep 2011 at 6:01

GoogleCodeExporter commented 8 years ago
No, but if you switch the preg_match to strstr it works. I'm still not sure why 
they are using preg_match instead of that, since strstr is not only faster but 
works with unique characters in the URL

Original comment by chadhunt...@gmail.com on 9 Sep 2011 at 6:12

GoogleCodeExporter commented 8 years ago
Switch in which line do you mean?
Preg_match is used 14 times? Could you specify?

Original comment by bes...@gmail.com on 9 Sep 2011 at 6:26

GoogleCodeExporter commented 8 years ago
I am wondering if this problem is going to be solved?
Can anybody help me? Do you know any solution?

Thank you.

Original comment by bes...@gmail.com on 22 Sep 2011 at 10:44

GoogleCodeExporter commented 8 years ago
*facepalm* No wonder my site broke. Good to know what the problem was at least 
:D

Original comment by X2009...@gmail.com on 7 Oct 2011 at 2:38

GoogleCodeExporter commented 8 years ago
Suggesting this be merged with Issue #120

Original comment by Nathanie...@gmail.com on 21 Nov 2011 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by BinaryMoon on 22 Nov 2011 at 8:07

GoogleCodeExporter commented 8 years ago
Hi,

Is there any solution to fix this problem ? It is very annoying.

Thanks a lot !

Original comment by salmi.ch...@gmail.com on 24 Nov 2011 at 5:24

GoogleCodeExporter commented 8 years ago
Still hoping this will be fixed. Any workaround for it?

Original comment by X2009...@gmail.com on 27 Jan 2012 at 4:00

GoogleCodeExporter commented 8 years ago
Here is the fix: 
http://elementdesignllc.com/2012/01/how-to-fix-timthumb-using-a-virtual-director
y-url-contains-tildes/

Original comment by chadhunt...@gmail.com on 27 Jan 2012 at 12:42

GoogleCodeExporter commented 8 years ago
Unfortunately, the fix posted above does not seem to work with the current 
version (2.8.10) - at least not for me!

Is anyone else having the issue with this version?

A permanent fix would be appreciated.

Original comment by solhar...@gmail.com on 31 Oct 2012 at 5:40

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I made some changes in the script and it worked. Follows  the modified file. 
You should only change the line 23 which is the variable $_SERVER 
['DOCUMENT_ROOT']

Original comment by joaojuni...@gmail.com on 12 Aug 2014 at 8:13

Attachments: