• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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