Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 894585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:24:56+00:00 2026-05-15T14:24:56+00:00

I have a php script, which downloads, rescales and stores an image using the

  • 0

I have a php script, which downloads, rescales and stores an image using the following command:

exec('convert -sample 100x100 http://someurl.com/pic.jpg images/somename.jpg');

It all worked fine until I put it on a different server (this one’s gentoo, if that makes any difference. Apparently convert won’t grab remote images, and if I feed it a url like above it returns
convert: missing an image filename 'images/somename.jpg' @ convert.c/ConvertImageCommand/2822.

I checked the use flags but nothing seems to relate to remote images…The new server is a local machine which I have root access to, so I can pretty much do whatever on it – so how can I make this work?

Another possibly related issue is that php’s file_get_contents() won’t get remote files from there either. Maybe it’s a system-wide setting somewhere preventing binaries from getting remote files? Has anyone had an issue like this before? How did you solve it?

Thanks,
Mala

Update: To clarify
This problem (imagemagick) has nothing to do with PHP. It’s on my laptop which can access the internet just fine, and is not related to firewalls. If I open up a shell and type
convert -sample 100x100 http://someurl.com/pic.jpg images/somename.jpg
it fails with the above error without even trying to access the internet. ‘wget’ on the other hand, as well as web-browsers etc work just fine. On other systems, the convert command when typed into a shell works with no errors.

Please disregard the file_get_contents problem as I believe it is not related for the reasons above

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:24:56+00:00Added an answer on May 15, 2026 at 2:24 pm

    Rather unintuitively, imagemagick must be compiled with the xml support in order to load remote images. Thus, Gentoo users will need to enable the xml useflag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written a PHP script that handles file downloads, determining which file is being
I have a PHP script that's supposed to take in a URL and search
I have created a program which allows me to upload images to my server.
I'm using Windows on my servers. I have to periodicly download some file to
I have a personal project that's been online for sometime now. I've been keeping
This post started as a question on ServerFault ( https://serverfault.com/questions/131156/user-receiving-partial-downloads ) but I determined
I'm wondering what is the quickest and most reliable way to forward mail from
When working with a subdirectory in a repository, how to find the revision when
Quick (and hopefully easy) question: I need to trigger a download of a PDF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.