plugin watermark error siena
elfrenazo |
|
---|---|
hello, error in watermark, images disappear. Config: datas/users/(.*?)\.(gif|jpeg|jpg|png) is that correct? I have to put something in htaccess? |
Trustmaster |
|
---|---|
That config looks correct. Could you give me some example "src" attribute values for images when watermark is enabled? May the Source be with you!
|
elfrenazo |
|
---|---|
Ok IMG LINE 1 \[img=((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\]((?:http://|https://|ftp://)?[^\]"\';:\?]+\.(?:jpg|jpeg|gif|png))\[/img\]
IMG LINE 2 \[img\]((?:http://|https://|ftp://)?[^"\';:\?\[]+\.(?:jpg|jpeg|gif|png))\[/img\]
|
Trustmaster |
|
---|---|
Sorry, I mean "src" of images in the HTML output (result page). May the Source be with you!
|
elfrenazo |
|
---|---|
<img src="http://www .malditopc.es/./datas/users//17_1308.jpg" alt="" /> |
|
This post was edited by elfrenazo (2013-05-14 03:51, 11 years ago) |
Trustmaster |
|
---|---|
And how does it look when watermark is enabled? May the Source be with you!
|
elfrenazo |
|
---|---|
sorry this is the html output to the selected watermark <img src="http://www .malditopc.es/./plugins/watermark/lib/watermark.php?path=datas%2Fusers%2F%2F17_1308.jpg" alt="" /> |
|
This post was edited by elfrenazo (2013-05-14 03:51, 11 years ago) |
Trustmaster |
|
---|---|
I see, something is wrong with path detection. Could you open 'plugins/watermark/lib/watermark.php' and replace line 12 with: echo '<h1>Forbidden</h1>Path: '.$path.'<br/>Realpath: '.$realpath.'<br/>DocRoot: ' . $_SERVER['DOCUMENT_ROOT']; This will help to find the bug. May the Source be with you!
|
elfrenazo |
|
---|---|
change line 9 FALSE / TRUE if (strpos($realpath, $_SERVER['DOCUMENT_ROOT']) === TRUE || !preg_match('#\.(gif|jpeg|jpg|png)$#i', $path))ok plugin
|