HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[solved]failed to save the given image

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#74950 (In Topic #15569)
Avatar

Community saint

IOTD error

My main site seems to have a problem saving IOTD linked images when there is a number or date prefixing the image name. This still happens after upgrading to 7.1.5, but does not seem to be the case for newer sites upgraded to 7.1.5.

Beside, the error message gives away private site information to every visitor.

Here is the data:

source image link said

location on server said

/uploads/iotds_thumbs/Shut%20up%20please.jpg

too public error message said

We failed to save the given image (imagejpeg() [function.imagejpeg.php]: Unable to open '/home/*****/public_html/*****/uploads/Several/500__2011-08-
17-Shutupplease.jpg' for writing: No such file or directory) 
The program seems to be looking for the same folders on the server than the ones at origin.


Last edit: by Jean
Back to the top
 
Posted
Rating:
#74951
Avatar

did you have some custom templating, perhaps using the THUMBNAIL symbol?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74952
Avatar

Community saint

Chris Graham said

did you have some custom templating, perhaps using the THUMBNAIL symbol?

Yes! (IOTD.tpl)

PHP code

<a href="{VIEW_URL*}"><img src="{$THUMBNAIL*,{IMAGE_URL},500}/></a>

The newer site does not have the change.
Back to the top
 
Posted
Rating:
#74953
Avatar

you need to specify a thumbnail dir if you ever use remote URLs, else this can happen,it detects it from URL which may be invalid.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74954
Avatar

Community saint

Chris Graham said

you need to specify a thumbnail dir if you ever use remote URLs, else this can happen,it detects it from URL which may be invalid.

Sorry, I couldn't get back sooner since I lost my Internet for a few minutes.

I understand what you say, but I have difficulty implementing it. I tried a few things, but it made a mess of things. I think I have to replace or complement {IMAGE_URL} with "/uploads/iotds_thumbs" somehow.

Back to the top
 
Posted
Rating:
#74955
Avatar

I think actually you just need an additional parameter. IIRC adding ",uploads/iotds_thumbs" before the closing "}" might be all you need.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74956
Avatar

Community saint

Chris Graham said

I think actually you just need an additional parameter. IIRC adding ",uploads/iotds_thumbs" before the closing "}" might be all you need.

In my present test after implementing this, it is now looking for:
"/uploads/2009-02/500__funny-pictures-409-2.jpg" while the file is stored as: /uploads/iotds_thumbs/funny-pictures-409-2.jpg
Back to the top
 
Posted
Rating:
#74959
Avatar

What's the full symbol you're using?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#74968
Avatar

Community saint

Chris Graham said

What's the full symbol you're using?

Code (php)

<a href="{VIEW_URL*}"><img src="{$THUMBNAIL*,{IMAGE_URL,uploads/iotds_thumbs},500}" /></a>
Back to the top
 
Posted
Rating:
#74969
Avatar

Try:

Code

<a href="{VIEW_URL*}"><img src="{$THUMBNAIL*,{IMAGE_URL},500,iotds_thumbs}" /></a>


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#75001
Avatar

Community saint

Sorry for the delay in answering, I just got back online.

This works perfectly!

Thank you Chris!
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: