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 8794279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:13:48+00:00 2026-06-13T23:13:48+00:00

I have following php code in a file: $figloc = $_GET[‘figrl’]; try { $image

  • 0

I have following php code in a file:

$figloc = $_GET['figrl'];

try
{
$image = new Imagick($figloc);
$image->setImageFormat("jpg");
$image->setImageColorSpace(5);  
$image->writeImage("temp.jpg");
}
catch(Exception $e)
{
 echo $e->getMessage();
}

and a jquery script like this:

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function() {
    figurelocation='temp.jpg';
    var fightmlstring='<img src=\"'+figurelocation+'\">';
    $('.figuredisplay').append(fightmlstring);
});

figuredisplay is a div element. $figloc value is the absolute address of the image on disk, like ‘/home/abc/def/ghi/jkl.tiff’. The php file, when opened from appropriate link, shows the error message “imagick unable to open file /home/abc/def/ghi/jkl.tiff”. Can the absolute address cause a problem?

Also, when I copied a particular tiff file to my directory, to see if the absolute address was a problem, imagick possessedly read that file, but failed to create temp.jpg

unable to open image `/var/www/temp.jpg @ error/blob.c/OpenBlob/2489 

Can anyone point me what I am doing wrong?

  • 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-06-13T23:13:49+00:00Added an answer on June 13, 2026 at 11:13 pm

    Ok, I figured out the problem. This was a really silly one. I am writing so others facing the same problem may benefit.

    Instead of

    $image = new Imagick($figloc);
    

    write:

    $abc= substr ( $figloc , 1, strlen($figloc)-2);
    $image = new Imagick($figloc);
    

    So, the single quotes from the figloc string are removed. Really silly 🙂

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

Sidebar

Related Questions

I have the following lines of php code which should rename a file which
In PHP I have the following code that gets a file submitted through CGI:
I have the following code: if (include_once(dirname(__FILE__).'/file.php') || include_once(dirname(__FILE__).'/local/file.php') ) { This causes an
I have the following PHP code to display the file structure of my site.
i have following php code which display company logo <?php $key=$_GET['key']; /// key process
In a Symfony project, I have the following php code inside a YML file.
I have following PHP code $filename = 'a56.flv'; $file = C:/xampp/htdocs/site/flv/a56.flv; header(Content-Type: application/force-download); header('Content-Type:
I have the following PHP code: $testMessage = TESTMESSAGE; $db = new SQLite3('messages.sq3'); $db->exec('CREATE
I have the following php code: <html> <body> <?php $_GET = Array('filename' => 'scores/score.sco&scoresize=10&action=VIEW&viewtype=HTML');
I have made the following code in a PHP file to list the content

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.