We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

plugin: Image Sizer

Development and Programming

NKT com's avatar
NKT com
124 posts
15 years ago
NKT com's avatar NKT com

I get the following error when using this plugin

Warning: mkdir() [function.mkdir]: Permission denied in /home/user/public_html/admin/plugins/pi.imgsizer.php on line 205

       
Joobs's avatar
Joobs
362 posts
15 years ago
Joobs's avatar Joobs

That sounds most likely a problem with your hosting setup.

The plugin wants to make a directory to store the resized and cached files in and i’m assuming a function called “mkdir” is failing to make a directory. Your host needs to give you the correct “permissions” to do this.

       
lukemcr's avatar
lukemcr
154 posts
15 years ago
lukemcr's avatar lukemcr

NKT com: all you need to do is to make the directory that imgsizer is looking for. imgsizer wants to store its cached thumbnails in it, but it can’t because it doesn’t exist.

To figure out where imgsizer wants to make its storage directory, turn template debugging on from the Control Panel. Then, look at all the messages that show up on the bottom of the screen when you reload your template with the imgsizer code in it. One of the messages towards the middle will be an error (cache_path perhaps?) that will tell you that it couldn’t make /home/example.com/public_html/images/sized/ or something of that sort.

Make that directory, and you should be good to go.

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

I’m getting this error:

Warning: mkdir() [function.mkdir]: Permission denied in /home/site/public_html/system/plugins/pi.imgsizer.php on line 205

I’m using this on a template that is a sub-domain of the main domain where EE has been installed. Is this a problem?

Thanks.

       
Joobs's avatar
Joobs
362 posts
15 years ago
Joobs's avatar Joobs

answer in the previous post?

       
lukemcr's avatar
lukemcr
154 posts
15 years ago
lukemcr's avatar lukemcr
Warning: mkdir() [function.mkdir]: Permission denied in /home/site/public_html/system/plugins/pi.imgsizer.php on line 205

This means that you need to change some folder permissions to 777 (or create the folders that imgsizer uses to store its cached, sized images.) Do

chmod -R 777

on all the directories that you store your images in: the directory that the image is uploaded to, and the “sized” directory, probably in the same directory that your images are uploaded to. If you don’t have a “sized” directory, you’re either looking in the wrong place, or you need to make one.

To see where imgsizer is expecting all of its folders to be, turn template debugging on in the CP and re-load the template with the imgsizer tags in it. Scroll down a bit, and you’ll find some useful errors.

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

You are correct about that. thanks.

Anyone know what the remote parameter is for? Is that for storing cached images remotely like on Amazon file storage service?

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

I’ve now encountered this error when uploading a 4.5mb photo approx 4000x3000px using solspace upload plugin

The following errors were encountered * file_exceeds_ini_limit

I’ve removed any max photo dimensions and file size in cpanel for this folder, so I don’t know what is going wrong.

UPDATE:

When I upload via the cpanel, I get this error:

The uploaded file exceeds the maximum allowed size in your PHP configuration file

When I look at config.php in my system folder I don’t see any reference to file dimensions. So I am confused.

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

UPDATE: The above problems have been resolved (well almost)

Does anyone know if I need more ram if I have image sizer sizing 10 large images on the same template as opposed to 1 large image?

Does it resize all photos at the same time or does it do it one at a time and therefore only need enough ram for one photo at a time?

Thanks

       
Michael Roper's avatar
Michael Roper
36 posts
15 years ago
Michael Roper's avatar Michael Roper

I’ve got a curly one here… I’m using the remote param to fetch some images on another website, but these images (charts actually) are being generated dynamically from an ASPX page using the data fed from GET vars in the URL, like this one here:

http://metalprices.com/PubCharts/PublicCharts.aspx?metal=pt lon&type=V&weight=KG&days=1&size=M&bg;=&cs=5&cid=0

Now, the problem is that while the imgsizer tag downloads the correct image, it saves the filename as ‘metalprices-com-PubCharts-PublicCharts.aspx’. This is a problem because A) my server doesn’t seem to want to serve the file with an aspx extension as an image, and B) if I try to load multiple images from the same URL (but with differing GET values), then it tries to use the same filename each time, which ain’t no good..

Soo… is there any way to make it save the file with a specified extension (jpg instead of aspx), and also include the GET vars in the file name?

       
Jon Horton's avatar
Jon Horton
38 posts
15 years ago
Jon Horton's avatar Jon Horton

Awesome Plugin! This thing is extremely useful.

I don’t know if anybody posted this yet, but i found myself needing to crop images, but have them aligned to the top rather than the center.

To do this, simply find Line 597 in pi.imgsizer.php

imagecopyresampled($image_resized, $image, -$int_width, -$int_height, 0, 0, $adjusted_width, $adjusted_height, $width_old, $height_old);

Replace -$int_height with 0. The revised code looks like this:

imagecopyresampled($image_resized, $image, -$int_width, 0, 0, 0, $adjusted_width, $adjusted_height, $width_old, $height_old);

Now re-upload the plugin, clear the cache, and your cropped images should be aligned to the top!

Hope this helps somebody! 😊

       
Austin Siewert's avatar
Austin Siewert
129 posts
15 years ago
Austin Siewert's avatar Austin Siewert

Thanks Jon, I was looking for something quite like this, but will do for now. I mentioned a feature a couple post back that would allow you to specify a corner to crop from, have a looksee (http://ellislab.com/forums/viewthread/62138/P540/#632096), do you think thats possible?

       
Ryan 2010's avatar
Ryan 2010
265 posts
15 years ago
Ryan 2010's avatar Ryan 2010

Is it possible, to have imgsizer show the cached images if the originals have been deleted?

Trying to free up server space…

       
VRDL's avatar
VRDL
23 posts
15 years ago
VRDL's avatar VRDL
Is it possible, to have imgsizer show the cached images if the originals have been deleted? Trying to free up server space…

No you can’t do that easily. Image Sizer checks for the original image and then checks if there is a cached version available.

What you could do, is create a 1px * 1px image with the same name as the original image so it will read that.

       
kundi's avatar
kundi
23 posts
15 years ago
kundi's avatar kundi

I’m experiencing some strange things using image sizer plugin.

If I pass ‘/images/uploads/10123_132222216486_661796486_3039866_7727135_n.jpg’ image as a src path to the plugin, it will created resized image in the ‘images/sized/images/uploads/<filename>…jpg’.

Why does it have to create 2 subfolders - /images/uploads/ from the src image? I tried changing the base_cache to ‘/images/sized’ but it wont work if I do that..

How can I solve that issue?

Thanks for help!

       
First 36 37 38 39 40 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.