-
Notifications
You must be signed in to change notification settings - Fork 25
MWF1.3 image compressor not working for external image? #168
Comments
@BerkeleyEdu do you have |
Yup. http://m-qa.berkeley.edu/phpinfo.php On 9/14/2012 7:59 AM, Eric Bollens wrote:
Sara Leavitt, Electronic Communications Specialist |
I'm kind of at a loss as to what may be causing it, so let's do a couple debug things:
|
Looks like disk_cache.class.php throws an exception in line 60 when permissions are set wrong on the |
By the way, I did a |
Not sure how to debug this class. I've tried these at the spot before //debug or //debug Also, do I need to create "img" and "simplepie" directories within -Sara On 9/17/2012 7:59 AM, Eric Bollens wrote:
Sara Leavitt, Electronic Communications Specialist |
Try using this to log the output: Because you're generating images, it's not very easy to do output through a print. |
Sara, the fix for this is at 7160434. That will allow remote images to work with a cache that has permissions set too tight. However, you should be able to fix this with the existing code by setting the permissions on your cache. Can you email me the output of running |
Hi Rich, Here is the permission info -- does it look correct? -sh-3.2$ cd /var/www/html What is the git command to extract your code fix? Thanks, Sara On 9/18/2012 5:53 AM, Trott wrote:
Sara Leavitt, Electronic Communications Specialist |
Your permissions look correct to me. Can you run the To get the patch:
|
-sh-3.2$ cd /var/www/html Not sure what this means? -Sara On 9/18/2012 2:48 PM, Trott wrote:
Sara Leavitt, Electronic Communications Specialist |
I have isolated where the image class fail with error messages. I receive the first error message but not the second. Error:/var/www/html/mwf/var/cache/img/8164fa0349599a1ac260c1afd7fcfe0a
So that returns me to a question I had earlier about creating the img directory in the cache directory ahead of time. Should Iask the sysadm to do that? But still not sure what this means? Are those directories there or not? -sh-3.2$ ls -l mwf/var/cache |
You should not create anything in the cache directory manually. The code will create directories that it needs. I don't know why there are all those question marks for those to directories, but I would delete them and see if they get recreated without problems. |
The permissions are fixed in the cache directories and the remote_image.class.php function completes -- no longer getting stuck on the path====false statement. However, the images are still not displaying: How do I know if this is working? |
You need to apply 7160434. (Alternatively, Eric, it's the pending pull request. Just slurp it into master and have Sara grab it from there.) |
Merged it |
Rich, Thanks, but I applied that update last week per your instructions: -sh-3.2$ git cherry-pick 7160434 Must be something about my directory set up. Here are the permissions. -sh-3.2$ pwd On 9/25/12 7:14 PM, Trott wrote:
|
Definitely related to local vs. remote images: Root relative URL for image displays: Same Image with absolute URL produces error: On 9/25/12 7:14 PM, Trott wrote:
|
When you run |
-sh-3.2$ wc -l mwf/root/assets/lib/image.class.php On 9/26/2012 6:55 PM, Trott wrote:
Sara Leavitt, Electronic Communications Specialist |
Just to make sure, I completely replaced my image.class.php with the Still getting error. Funny thing is that if I comment out the header //header("Content-type: " . $image->get_mimetype()); then I see binary data (not a blank) so I think the file is getting -Sara On 9/26/2012 6:55 PM, Trott wrote:
Sara Leavitt, Electronic Communications Specialist |
I saved the binary code from the remote and local versions of the same The local version opens fine in PhotoShop: but remote version: produces the error: Sara Leavitt, Electronic Communications Specialist |
Looks like you left the |
The cache file in img that should be created will be called |
Looks like it's generating corrupt files straight up on the remote URLs. I added When I do a vanilla checkout of the master branch, I don't have any problems with the same exact files and URL params. Try this: |
Fixed! I replaced remote_image.class.php with the version in git and the images Thanks for all your help! -Sara On 9/27/12 10:41 PM, Trott wrote:
|
The image compressor in my qa installation of MWF 1.3 installation:
is throwing these errors
Sep 13 12:27:14 as-mobile-qa httpd[3288]: [error] [client 169.229.206.54] PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/mwf/root/assets/lib/image/remote_image.class.php on line 57
Sep 13 12:27:14 as-mobile-qa httpd[3288]: [error] [client 169.229.206.54] PHP Warning: file_get_contents(http://events.berkeley.edu'.): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/mwf/root/assets/lib/image/remote_image.class.php on line 57
Sep 13 12:27:14 as-mobile-qa httpd[3288]: [error] [client 169.229.206.54] PHP Notice: getimagesize(): Read error! in /var/www/html/mwf/root/assets/lib/image.class.php on line 179
Sep 13 12:27:14 as-mobile-qa httpd[3288]: [error] [client 169.229.206.54] PHP Notice: exif_imagetype(): Read error! in /var/www/html/mwf/root/assets/lib/image/remote_image.class.php on line 98
Also does NOT work using UCSF's installation
http://m.ucsf.edu/assets/min/img.php?img=http://events.berkeley.edu/images/user_uploads/0_desert_medium.jpg&max_height=60&max_width=60
But works OK with UCLA:
http://m.ucla.edu/assets/min/img.php?img=http://events.berkeley.edu/images/user_uploads/0_desert_medium.jpg&max_height=60&max_width=60
-Sara
The text was updated successfully, but these errors were encountered: