• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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