Closed yuka123 closed 11 years ago
The log file you posted seems to be cutting the lines short. Can you repost it with the entire lines so we can see the file and line number throwing the error?
Also, here's a list of things you can check.
Do you have imagemagick or GD library installed on the server? Do you have friendly URLs enabled in MODX? What version of PHP and Apache are you running?
I have both GD and imagemagick, i have freindly urls, I am using nginx. The error is produced by the main phpthumbsup class, the scandir returns no such file or folder, also physically when i check either the phpthumbsup folder in core or the cache folders in assets\core the folders are empty and there are no thumbs generated. Also I have set correct permissions on all folders, so It should work. Basicly I got another instance of phpthumb where I am doing it custom with my snippets, and it works fine.
If scandir is saying no such file or folder, either your system setting for phpthumbsup.cache_path is set incorrectly or the folder isn't accessible. Can you tell us what the value of your phpthumbsup.cache_path setting is?
sdwespi I know, but it seems to be correct, maybe it is my server because I am using Nginx instead of Apache. Will do some inspection.
phpthumbsup.cache_path: {core_path}components/phpthumbsup/cache/
phpthumbsup.core_path: {core_path}components/phpthumbsup/
Standard paths..
That's interesting. We haven't tried out phpthumbsup on Nginx yet, but I'm not sure why that would matter. Those paths definitely look correct. Let us know what you find!
-Scott
yuka - could you send some more details about your nginx configuration? I wonder if your $_SERVER['REQUEST_URI'] value is set to the redirected URL (index.php?q=...) or the original URL before the redirect.
Thanks!
-Scott
Where can I check $_SERVER['REQUEST_URI'] value? I don't remember ever touching that or changing it.
That value should be set by nginx for you. You can find out what it is with a snippet like so:
return $_SERVER['REQUEST_URI'];
In Apache, after a rewrite the $_SERVER['REQUEST_URI'] variable is set to the original URL, but I believe by default nginx will have the rewritten value. In other words, with friendly URLs enabled and you visit /page-one/page-two.html, the rewriter will turn that into /index.php?q=page-one/page-two.html (or something similar). With Apache $_SERVER['REQUEST_URI'] will return the '/page-one/page-two.html', but I'm afraid by default nginx will return '/index.php?q=page-one/page-two.html'.
I think setting something like this in your nginx configuration should do the trick, but again my experience with nginx is extremely limited:
fastcgi_param REQUEST_URI $request_uri;
We've recently upgraded a few servers to nginx / fpm and unfortunately we're having trouble recreating this issue. If you're still having trouble getting it to work, let us know and we can trade config files. For now I'm going to close this issue though.
Thanks!
-Scott
Hey thanks for extra, but I can't make it work. It won't generate any thumbs.
I keep getting this in my server log:
2013/05/09 12:30:08 [error] 18845#0: 13732 open() "/var/www/cef/thumbs/w/120/h/120/zc/1/fltr[]/bord|5|0|0|FFFFFF/ra/-15/src/assets/site/20120515P/$ 2013/05/09 12:30:10 [error] 18845#0: 13752 FastCGI sent in stderr: "PHP message: PHP Warning: getimagesize(thumbs/w/94/f/png/q/100/fltr%5B%5D/sat$ PHP message: PHP Warning: getimagesize(thumbs/w/94/f/png/q/100/fltr%5B%5D/sat%7C5/fltr%5B%5D/cont%7C10/fltr%5B%5D/usm%7C80%7C3%7C20/src/thumbs/w/3$ PHP message: PHP Warning: getimagesize(thumbs/w/94/f/png/q/100/fltr%5B%5D/sat%7C5/fltr%5B%5D/cont%7C10/fltr%5B%5D/usm%7C80%7C3%7C20/src/thumbs/w/3$ PHP message: PHP Warning: getimagesize(thumbs/w/94/f/png/q/100/fltr%5B%5D/sat%7C5/fltr%5B%5D/cont%7C10/fltr%5B%5D/usm%7C80%7C3%7C20/src/thumbs/w/3$ PHP message: PHP Warning: getimagesize(thumbs/w/94/f/png/q/100/fltr%5B%5D/sat%7C5/fltr%5B%5D/cont%7C10/fltr%5B%5D/usm%7C80%7C3%7C20/src/thumbs/w/3$
Also I created the cache folder in both assets and core , tried fiddling with permissions, with no luck. The images don't get generated in the folder.