I’ve tried changing the path a few times but it doesn’t seem to have any effect on the error message.
-
☆ A M B ☆
- 24,524 Posts
Has anybody gotten a solution to this?
It's showing up in a site I've cloned into a subdirectory. Nothing here fixed the problem. I upgraded to 2.2, completely deleted the phpthumbof extra and re-downloaded and installed it. Setting the phpthumb_document_root makes no difference, no matter what I set it to.
PHP warning: file_get_contents(/Applications/MAMP/htdocs/hah2//hah2/assets/images/gear/flexfit-black.jpg) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory
The Media Source works fine, the TV works fine, MIGx works fine, the unmodified images are displayed fine.
-
☆ A M B ☆
- 24,524 Posts
For some reason, the file path being fed into phpthumb has the base_path (in this case /hah2/) prepended to the raw image path returned by the TV.
Further investigation shows all image TVs getting the base_path prepended.
[ed. note: sottwell last edited this post 14 years, 8 months ago.]
-
☆ A M B ☆
- 397 Posts
Anyone get a fix for this? I am dealing with the same thing on multiple MODX Revo 2.2 installations. I already posted:
https://forums.modx.com/thread/31485/problems-with-phpthumbof?page=2#dis-post-415103
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
-
☆ A M B ☆
- 397 Posts
I was able to solve it in a temporary fashion so:
[[!phpthumbof? &input=`../[[*newsImage]]` &options=`&w=564&h=300&zc=1`]]
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
-
☆ A M B ☆
- 397 Posts
Now that I installed Babel and am dealing with contexts, than this did not work anymore. The only way I found now to solve it is to leave the base_url setting empty..for some reason it works. But the tinymce now is not correctly inserting images from the media browser
Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
Same problem!
[14] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/home/www/websites/domain.com/sito/) to $filename (/sito/assets/templates/bmx/images/articoli/spray-tecnici/vmd10.jpg) resulting in ($AbsoluteFilename = "/home/www/websites/domain.com/sito//sito/assets/templates/bmx/images/articoli/spray-tecnici/vmd10.jpg") in file "phpthumb.class.php" on line 1025
$AbsoluteFilename value, contains double subdir .../sito//sito/... instead of .../sito/...
$_SERVER['DOCUMENT_ROOT'] // return /home/www/websites/domain.com
but $this->config_document_root for some reason // return /home/www/websites/domain.com/sito/
for now I solved by changing the line 1024 of core/model/phpthumb/phpthumb.class.php to:
$AbsoluteFilename = $_SERVER['DOCUMENT_ROOT'].$filename;
[ed. note: mopmodx last edited this post 14 years, 6 months ago.]
----------------------------------
canale irc Italiano #modx server: tophost.azzurra.org
-
☆ A M B ☆
- 3,141 Posts
Try setting phpthumb_document_root to /home/www/websites/domain.com/ and phpthumb_allow_src_above_docroot to yes.