I am unable to generate the media styles on my production server while it is working fine on my local machine.
Production server is having centos and httpd web server while my local have apache2.2 and ubuntu.
I have invested more than a day to apply many changes given on the forums like below:
- Cheking with $conf['image_allow_insecure_derivatives'] = False;
- By changing multiple options in .htaccess
- httpd settings for Allow from all and others
- By changing ownership of files and its subdirectory to apache user
- Full permission on files and all inner directories
- Using imageinfo_cache module : I used this module and its started working for few images but randomly so uninstalled the same
Note: I noticed that if a new image style is created then its sample file works well and stored in the files's style directory but when we apply the same style on any image field and upload the image it doesn't create the image in the style directory. I checked that main image is uploaded in the files directory but its file permission get changed to 664 and it doesn't get created in the style directory at the time of style creation. If I change the permissions manually and then reload the page it shows the styles created. Means images permissions are getting changed on upload.
Tried many solutions to maintain the same directory permissions on the image too but that is not applied by any condition. If I check in the console it gives 403 (forbidden). Looking for any help..................Thanks
Comment | File | Size | Author |
---|---|---|---|
#2 | image_style_generation.patch | 634 bytes | sunilsinghgaur |
Comments
Comment #2
sunilsinghgaur CreditAttribution: sunilsinghgaur commentedSo after digging many days, I found one solution. I just added the following lines in the modules/image.module in line number 1056 and now it started creating the images and working fine for all styles.
Created patch for the same. Attaching patch also.
To resolve this, I already tried the following things:
Comment #3
sunilsinghgaur CreditAttribution: sunilsinghgaur commentedComment #4
B Boy Breaker CreditAttribution: B Boy Breaker commentedOh my god.
I can't believe i spent 3 hours and after all that time i checked the drupal issues ...
#2 works fine
thank you man you saved the rest of this hard day ...