Project

General

Profile

SOLVED: Web display problems: unable to see tilt series or goniometer calibration information in the web interface

Added by Patrick Goetz over 6 years ago

Hi -

We're having problems with some information not displaying through the web interface. I've attached a couple of screen shots. Other users also report not seeing configuration information that they can normally see when viewing images.


Replies (12)

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Anchi Cheng over 6 years ago

Are you missing everything that uses jpgraph ? Is it possible that jpgraph included in myamiweb does not work with your php version ? Goniometer calibration graph depends on whether the users have done such calibration, but tomography tilt model plot certainly should show. Check a single graph in the session summary page, that is the most reliable. If any of the graph works, the problem is not jpgraph.

If the problem is jpgraph not compatible with your php version. Get it from their server, put in library path for myamiweb and see if it works for you.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Patrick Goetz over 6 years ago

Hi -

Just getting back to the jpgraph issue. Can you tell me where jpgraph is located in a standard installation? I can't seem to find it in the myamiweb folder.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Patrick Goetz over 6 years ago

Oops, never mind. Just realized it's a collection of php files:

root@kraken:/var/www/html/myamiweb/inc# ls jpgraph*
jpgraph_antispam-digits.php  jpgraph_gradient.php    jpgraph_plotmark.inc.php
jpgraph_antispam.php         jpgraph_iconplot.php    jpgraph_polar.php
jpgraph_bar.php             jpgraph_imgtrans.php    jpgraph_radar.php
jpgraph_canvas.php         jpgraph_legend.inc.php  jpgraph_regstat.php
jpgraph_canvtools.php         jpgraph_line.php         jpgraph_rgb.inc.php
jpgraph_date.php         jpgraph_log.php         jpgraph_scatter.php
jpgraph_errhandler.inc.php   jpgraph.php         jpgraph_stock.php
jpgraph_error.php         jpgraph_pie3d.php         jpgraph_text.inc.php
jpgraph_flags.php         jpgraph_pie.php         jpgraph_ttf.inc.php
jpgraph_gantt.php         jpgraph_plotband.php    jpgraph_utils.inc.php
jpgraph_gb2312.php         jpgraph_plotline.php

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Patrick Goetz over 6 years ago

Hi Thomas -

Thanks for the hint, but that fix didn't work for us (nor do I see how it could have). What version of PHP are you using? What linux distribution is it running on? According to the PHP documentation (http://php.net/manual/en/function.imageantialias.php), the imageantialias function should be available on any version of PHP compiled with gd, and since we have the php-gd package installed, I'm assuming our (Ubuntu 16.04) version of PHP 7.0.30 is compiled with gd support.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Thomas Klose over 6 years ago

Hi Patrick,

I agree that it does not make much sense. We are running Ubuntu 16.04 with PHP 5.6 and gd support enabled (at least that is what phpinfo reports). The error seems to be a problem with anti aliasing that is specific to the Debian/Ubuntu implementation of gd and a Google search listed this that as an easy workaround for PHP5. Sorry it doesn't seem to work for PHP7.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Anchi Cheng over 6 years ago

Thanks to Tomas to provide that works for him. I am glad to see interaction here.

Patrick, I do not have a solution that I can test. jpgraph we put in the repository is just a version that we know worked at the time. You can move that under another folder and download a version that you know works with php 7 and see if our call still works. jpgraph comes with some examples. You should be able to try it out not through myamiweb first.

Good luck.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Anchi Cheng over 6 years ago

Hi, Patrick,

Found an old note when I first got my development MacBook upgraded to High Sierra. At least on my Mac, jpgraph error display did not work right on the pre-installed php 7 because lang/en.inc.php was not in include_path. When there was no error, jpgraph came with myami did work though.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Patrick Goetz about 6 years ago

Finally am working my way back to this issue. I downloaded a newer version of jpgraph (4.2.3) but notice there isn't a 1-1 correspondence between the files in the jpgraph tgz file and the related files in ~/myamiweb/inc.

In particular, the new jpgraph includes fonts, lang, and theme folders which aren't present in ~/myamiweb/inc.

Are these features of the newer version only, have they been placed in a different location in myamiweb heierarchy, or are they just unnecessary for myamiweb's purposes? Basically I'm asking if you just copied everything from jpgraph-old_version/src to myamiweb/inc or were only selective elements included in the myamiweb distribution?

I'm including a complete listing of the jpgraph-4.2.3 src folder below:

cnsit@kraken:~/jpgraph-4.2.3/src$ ls
barcode                 jpgraph_iconplot.php
Examples             jpgraph_imgtrans.php
flag_mapping             jpgraph_led.php
flags.dat             jpgraph_legend.inc.php
flags_thumb100x100.dat         jpgraph_line.php
flags_thumb35x35.dat         jpgraph_log.php
flags_thumb60x60.dat         jpgraph_meshinterpolate.inc.php
fonts                 jpgraph_mgraph.php
gd_image.inc.php         jpgraph.php
imageSmoothArc.php         jpgraph_pie3d.php
imgdata_balls.inc.php         jpgraph_pie.php
imgdata_bevels.inc.php         jpgraph_plotband.php
imgdata_diamonds.inc.php     jpgraph_plotline.php
imgdata_pushpins.inc.php     jpgraph_plotmark.inc.php
imgdata_squares.inc.php      jpgraph_polar.php
imgdata_stars.inc.php         jpgraph_radar.php
jpg-config.inc.php         jpgraph_regstat.php
jpgraph_antispam-digits.php  jpgraph_rgb.inc.php
jpgraph_antispam.php         jpgraph_scatter.php
jpgraph_bar.php             jpgraph_stock.php
jpgraph_canvas.php         jpgraph_table.php
jpgraph_canvtools.php         jpgraph_text.inc.php
jpgraph_contour.php         jpgraph_theme.inc.php
jpgraph_date.php         jpgraph_ttf.inc.php
jpgraph_errhandler.inc.php   jpgraph_utils.inc.php
jpgraph_error.php         jpgraph_windrose.php
jpgraph_flags.php         lang
jpgraph_gantt.php         README
jpgraph_gb2312.php         themes
jpgraph_gradient.php

(I didn't mention the barcode folder, as I'm pretty sure that's not relevant.

RE: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Anchi Cheng about 6 years ago

Hi, Patrick,

I do not know for sure but I think lang used to located in other php inc area as built-in. It should not be a problem including them here.

However, I think you should first test its functionality in a stand-alone case by following jpgraph's installation and testing examples from their site before you put it inside myamiweb. This way you will be able to ping point which part has the problem.

RE: SOLVED: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Patrick Goetz about 6 years ago

Updating jpgraph to 4.2.3 mostly solved the problem. I will document my steps here.

1. Download jpgraph-4.2.3.tar.gz from this location: https://jpgraph.net/download/ and untar into any folder. The files you will need can be found here: ~/jpgraph-4.2.3/src

2. The jpgraph files used by myamiweb are located here: ~/myamiweb/inc
Based on a comparison between the folders, remove the following files from ~/myamiweb/inc

gd_image.inc.php         jpgraph_iconplot.php
imgdata_balls.inc         jpgraph_imgtrans.php
imgdata_bevels.inc         jpgraph_legend.inc.php
imgdata_diamonds.inc         jpgraph_line.php
imgdata_pushpins.inc         jpgraph_log.php
imgdata_squares.inc         jpgraph.php
imgdata_stars.inc         jpgraph_pie3d.php
jpg-config.inc.php         jpgraph_pie.php
jpgraph_antispam-digits.php  jpgraph_plotband.php
jpgraph_antispam.php         jpgraph_plotline.php
jpgraph_bar.php             jpgraph_plotmark.inc.php
jpgraph_canvas.php         jpgraph_polar.php
jpgraph_canvtools.php         jpgraph_radar.php
jpgraph_date.php         jpgraph_regstat.php
jpgraph_errhandler.inc.php   jpgraph_rgb.inc.php
jpgraph_error.php         jpgraph_scatter.php
jpgraph_flags.php         jpgraph_stock.php
jpgraph_gantt.php         jpgraph_text.inc.php
jpgraph_gb2312.php         jpgraph_ttf.inc.php
jpgraph_gradient.php         jpgraph_utils.inc.php

3. The new version of jpgraph includes a number of additional files. Some of these (e.g. bargraph and Examples) are clearly not relevant to myamiweb. These are the files I copied from the src folder to ~/myamiweb/inc:

fonts                 jpgraph_legend.inc.php
gd_image.inc.php         jpgraph_line.php
imageSmoothArc.php         jpgraph_log.php
imgdata_balls.inc.php         jpgraph_meshinterpolate.inc.php
imgdata_bevels.inc.php         jpgraph_mgraph.php
imgdata_diamonds.inc.php     jpgraph.php
imgdata_pushpins.inc.php     jpgraph_pie3d.php
imgdata_squares.inc.php      jpgraph_pie.php
imgdata_stars.inc.php         jpgraph_plotband.php
jpg-config.inc.php         jpgraph_plotline.php
jpgraph_antispam-digits.php  jpgraph_plotmark.inc.php
jpgraph_antispam.php         jpgraph_polar.php
jpgraph_bar.php             jpgraph_radar.php
jpgraph_canvas.php         jpgraph_regstat.php
jpgraph_canvtools.php         jpgraph_rgb.inc.php
jpgraph_contour.php         jpgraph_scatter.php
jpgraph_date.php         jpgraph_stock.php
jpgraph_errhandler.inc.php   jpgraph_table.php
jpgraph_error.php         jpgraph_text.inc.php
jpgraph_flags.php         jpgraph_theme.inc.php
jpgraph_gantt.php         jpgraph_ttf.inc.php
jpgraph_gb2312.php         jpgraph_utils.inc.php
jpgraph_gradient.php         jpgraph_windrose.php
jpgraph_iconplot.php         lang
jpgraph_imgtrans.php         themes
jpgraph_led.php

4. Unfortunately this didn't quite work yet! When trying to generate a graph, I got the following error message:

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

However I do have the PHP version of gd installed:

root@kraken:/etc/php/7.0/apache2# dpkg -l | grep php | grep gd
ii  php-gd                                1:7.0+35ubuntu6.1                          all          GD module for PHP [default]
ii  php7.0-gd                             7.0.30-0ubuntu0.16.04.1                    amd64        GD module for PHP

Apparently this is a known problem. Multiple web pages suggest the following solution (e.g. http://colekcolek.com/2012/05/16/how-to-fix-jpgraph-error-the-function-imageantialias-is-not-available/ )

Edit the gd_image.inc.php file, commenting out the JpGraphError line in the else { statement:

    // Should we use anti-aliasing. Note: This really slows down graphics!
    function SetAntiAliasing($aFlg=true) {
        $this->use_anti_aliasing = $aFlg;
        if( function_exists('imageantialias') ) {
            imageantialias($this->img,$aFlg);
        }
        else {
 ---->  //    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.')
        }
    }

This results in a working jpgraph installation for myamiweb, at least for PHP 7.0.

RE: SOLVED: Web display problems: unable to see tilt series or goniometer calibration information in the web interface - Added by Anchi Cheng about 6 years ago

Patrick,

Thanks for putting the steps you went through here for others to follow.

    (1-12/12)