bradjtrammell / timthumb

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

HHVM, Magento, Nginx and Timthumb #495

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Loading the website with HipHop VM 3.3.0-dev (rel)
2.
3.

What is the expected output? What do you see instead?

The expected output is for timthumb to generate images and although in the log 
files it seems to show that files are being grabbed, the output on the website 
shows dimensions only, but no actual image.

What version of the product are you using? On what operating system?

I am using Ubuntu 14.04 with the latest release of timthumb, NGINX, and Magento 
Enterprise.

Please provide any additional information below.

I'm currently running a test site with Magento, HHVM. and Nginx.  The site 
loads properly and images coming from external CDN sources show beautifully.  
The slider works, the images coming from the blog work, however, when trying to 
view files generated by timthumb, I only get the image sizes.  I've added a 
snapshot.  

I don't see any errors in the logs.  If I curl an image that I cannot see, I 
got a proper response from the command-line.  The response looks like:

149.200.173.207 - - [12/Sep/2014:09:14:00 +0000] "GET 
/timthumb/catalog/category/400/400/0/0/1701_Square_LR_8.jpg HTTP/1.1" 200 1657 
"http://domainname.com/example/" "Mozilla/5.0 (Windows NT 6.1; WOW64) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"

I have a separate dev server running php-fpm with the exact same Nginx, 
php-fpm, etc. configuration, and the images show just fine.  Anything special I 
need to do? I've researched the web and can't seem to figure out issues with 
HHVM and timthumb if any.

Thank you

Original issue reported on code.google.com by ramyash...@gmail.com on 12 Sep 2014 at 9:17

Attachments:

GoogleCodeExporter commented 8 years ago
I've got the same issues, you are correct, and I can't seem to grasp what's 
wrong here.

Original comment by larcen...@gmail.com on 16 Sep 2014 at 1:52

GoogleCodeExporter commented 8 years ago
But I should note, I'm using Wordpress theme bundled with timthumb

Original comment by larcen...@gmail.com on 16 Sep 2014 at 1:54

GoogleCodeExporter commented 8 years ago
Anyone have any ideas? I don't see any errors in the log files. 

Original comment by ramyash...@gmail.com on 16 Sep 2014 at 9:47

GoogleCodeExporter commented 8 years ago
I have a new discovery, I believe the headers are not in the cache file, only 
the image data, and that is read from disk, and sent with new headers on it. In 
HHVM the correct image headers are not being sent, only the contents of the 
temp files.

Original comment by larcen...@gmail.com on 17 Sep 2014 at 9:08

GoogleCodeExporter commented 8 years ago
Larcen, are you using Apache or Nginx to serve WordPress? 

Original comment by ramyash...@gmail.com on 18 Sep 2014 at 5:22

GoogleCodeExporter commented 8 years ago
I found this, which may relate, https://github.com/facebook/hhvm/issues/3241

Original comment by ramyash...@gmail.com on 18 Sep 2014 at 5:24

GoogleCodeExporter commented 8 years ago
Using Nginx serving Wordpress 4 (With HHVM of course)

Original comment by larcen...@gmail.com on 18 Sep 2014 at 3:41

GoogleCodeExporter commented 8 years ago
A quick update, just running through and it seems, at least for me, that with 
Nginx and HHVM, cloudflare is incorrectly detecting content-types which is why 
the images aren't showing up.  When I switch the site over to php-fpm, 
everything works fine.  Looking for a way to disable cloudflare, or correctly 
setup the system to detect properly.  Any news from anyone?

Original comment by ramyash...@gmail.com on 25 Sep 2014 at 5:34