New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph no longer works: imageantialias() is not available #386

Closed
stefaweb opened this Issue Jan 12, 2017 · 12 comments

Comments

Projects
None yet
3 participants
@stefaweb
Contributor

stefaweb commented Jan 12, 2017

All graph scripts no longer works on my new dev server.

I got:

JpGraph Error: 25128 The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.

Debian Jessie
php5-gd 5.6.29+dfsg-0+deb8u1

/etc/php5/cli/conf.d/20-gd.ini,
GD Support => enabled
GD headers Version => 2.1.1-dev
gd.jpeg_ignore_warning => 0 => 0

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 12, 2017

See lib/jpgraph/src/gd_image.inc.php

        JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.')
@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 12, 2017

In case of need, found this fork of JpGraph.

https://github.com/umanit/jpgraph

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 12, 2017

They also have a new 4.0.2 version.
http://jpgraph.net/download/

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 13, 2017

Works if we comment out line 110 of gd_image.inc.php.

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 13, 2017

Better solve.

In lib/jpgraph/src/jpg-config.inc.php at line 137 (at the end), add:

if(!ANTIALIASING){
    function imageantialias($image, $enabled){
        return true;
    }
}

Tested ok with 4.0.2.

@endelwar endelwar added this to the v1.2.0 milestone Jan 13, 2017

@endelwar endelwar added the bug label Jan 13, 2017

@endelwar

This comment has been minimized.

Member

endelwar commented Jan 13, 2017

you should report this also to JpGraph.

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 13, 2017

I can do it if you want?

  • update to 4.0.2
  • patch for jpg-config.inc.php
@endelwar

This comment has been minimized.

Member

endelwar commented Jan 16, 2017

I've looked better at this issues and seems related to Debian/Ubuntu decision to not include this function for their policy (see https://lists.debian.org/debian-user/2015/03/msg00283.html)

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 16, 2017

Updated PR.

// Patch for Debian PHP
define('ANTIALIASING', false);

if(!ANTIALIASING){
    function imageantialias($image, $enabled){
        return true;
    }
}
// End

Just for information. PHP 5.6 Dotdeb is not available for Debian Jessie.
Only PHP version 7.

Will upgrade my dev server to PHP 7 dotdeb later to test.

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Jan 18, 2017

Fixed in #389

@Skywalker-11

This comment has been minimized.

Member

Skywalker-11 commented Feb 4, 2017

The patch also works if it is put in the top part of functions.php so we don't have to mess with the JpGraph library eg https://github.com/Skywalker-11/1.2.0/commit/0b03f4cb4a4af76a7bfa4dc9a954af4d7d214052

@stefaweb

This comment has been minimized.

Contributor

stefaweb commented Feb 4, 2017

Great!

Remove lib/jpgraph/UPDATE no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment