• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

PHP problem after upgrade

S

Snef

Guest
Hi,

after upgrade 7.5.6 to 7.6.0 i have some problems with the gd2.

I use a little php script to display an image and it worked fine with an url as image path.

That is not working anymore??

The (simplified) script (gd.php) is:
PHP:
<?
// JUST AN EXAMPLE...
$image_path = $_GET['img']; 
$img = LoadJpeg($image_path);
header("Content-type: image/jpeg");
imagejpeg($img);

function LoadJpeg($imgname) 
{
    $im = @imagecreatefromjpeg($imgname); /* Attempt to open */
    if (!$im) { /* See if it failed */
        $im  = imagecreatetruecolor(150, 30); /* Create a black image */
        $bgc = imagecolorallocate($im, 255, 255, 255);
        $tc  = imagecolorallocate($im, 0, 0, 0);
        imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
        /* Output an errmsg */
        imagestring($im, 1, 5, 5, "Error loading $imgname", $tc);
    }
    return $im;
}

?>

I used: http://domainX/gd.php?img=http://domainX/img/blafoo.jpg
worked with plesk 7.5.6 (NOT in 7.6)

in 7.6 i have to use:
an image that is in the same dir (http://domainX/gd.php?blafoo.jpg)
OR
an absolutepath (http://domainX/gd.php?d:/inetpub/...../blafoo.jpg)

Any ideas?

(allow_url_open is on, safe-mode is off)

Snef
 
Back
Top