Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Problem with text in images built with GD

  • Problem with text in images built with GD

    Posted by Robb11 on October 18, 2007 at 21:14

    Hi all!
    I have just installed the last stable version of Pandora 1.3 on my Fedora 7 system.
    Everything works but I have problems with GD. I have installed GD and php-gd from the official Fedora repository. Images are built fine in the php page and render the effective status of systems, but no text is show as legend.
    For example, going on the “Pandora agents > Tactical View” menu I can see the Tactical Indicator but under the red, black and blue triangles no text is shown.
    What should I do?

    Thank in advance for your help,
    Robb.

    Robb11 replied 17 years, 4 months ago 4 Members · 15 Replies
  • 15 Replies
  • manu

    Member
    October 19, 2007 at 11:19
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    A good start would be going to any of the images where you don’t see the text and clicking on “view image” (on your browser menu) and then take a look at the access_log and error_log of the apache.
    Let us know what it shows

  • Robb11

    Member
    October 19, 2007 at 16:07
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Well,
    I have done what you have suggested but I am not able to write it in this post because of the user accounts restrictions of this forum.
    Have you got an email which I can use?

    Thanks a lot for your help,

    Robb

    P.S.: I am sorry because of the two discussions opened, but I did not know what was the right section.

  • Robb11

    Member
    October 19, 2007 at 17:38
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Because of the problem written in the previous post, I have sent you the entry added to the access_log by the h t t p d server after the “View Image” action via pm.

    The error_log instead does not show any entry as pandora_server.error and pandora_server.log.

    Thanks for your help,

    Robb

  • Robb11

    Member
    October 19, 2007 at 17:39
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    That’s the access_log entry finally!

    10.30.11.46 – – [19/Oct/2007:12:47:08 +0200] ” G E T / pandora_console / reporting / fgraph . php ? tipo=odo_tactic&value1=100&value2=100&value3=100 H T T P/1.1″ 200 4602 “-” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20070718 Fedora/2.0.0.5-1.fc7 Firefox/2.0.0.5”

  • Takie

    Member
    October 22, 2007 at 11:37
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I’m having the same problem. I am sure I installed all the correct dependencies but still no text in the images. Maybe something with font support?

  • Robb11

    Member
    October 22, 2007 at 11:52
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Now I have just installed php* and perl* from the repository. Nothing… It is the only problem I have with Fedora. I have written a guide for the installation of Pandora on Fedora step by step too, but It is useless to share it with the world if I cannot solve this problem.
    Could my step by step howto help with the diagnostic?

  • Takie

    Member
    October 22, 2007 at 12:42
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I’m having the problem on Ubuntu 7.04. I had it fixed on a previous installation of Pandora (1.3 beta) on another computer by installing a certain prerequisite I accidentally bumped onto but I forgot which one it was 😳

  • Robb11

    Member
    October 22, 2007 at 13:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    It was a font_path problem.
    I have studied the fgraph.php code concerning the odo_tactic graph building type.
    This function loads the font from the path specified in the variable $config_fontpath wrongly specified in the config.php file. I have corrected it specifing the correct path (the absolute path is /var/www/html/pandora_console/include) and now it works!

    I hope to have helped you too!

    Robb.

  • raul

    Member
    October 22, 2007 at 14:04
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    This is an access.log file . The problem should be in the error.log file or in the php error file (if configured).

    Raúl

  • manu

    Member
    October 22, 2007 at 14:08
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Perfect guys, I’m gonna upload this to the FAQ 🙂
    Well done

  • raul

    Member
    October 22, 2007 at 14:30
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    It was a font_path problem.
    I have studied the fgraph.php code concerning the odo_tactic graph building type.
    This function loads the font from the path specified in the variable $config_fontpath wrongly specified in the config.php file. I have corrected it specifing the correct path (the absolute path is /var/www/html/pandora_console/include) and now it works!

    I hope to have helped you too!

    Robb.

    The variable in the config.php is

    [code:1]$config_fontpath = $config_homedir.”/reporting/FreeSans.ttf”;

    Where

    [code:1]$config_homedir is set in the installation process.

    The pandora_console file has the FreeSans.ttf in both places:

    [code:1]/pandora_console/reporting/FreeSans.ttf
    /pandora_console/include/FreeSans.ttf

    So, I don’t know why you have this problem and you have solved it by changing the path to another place where it’s the same file!

    Raúl

  • Robb11

    Member
    October 22, 2007 at 14:48
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Oh! Yes, you are in right! I have seen that the font is in both the two directories.
    Sorry, I have to correct myself.
    The problem was in the construction of the $config_fontpath, but recursively, I found the mistake in the $config_homedir. During the setup process I left if as default (/var/www/pandora_console/) while it should be /var/www/html/pandora_console.

    Well, surely it is not a software bug, but probably other persons could find this error. So that, it could be useful to check it before gonig mad with probably uninstalled dependencies as happened to me.

  • Takie

    Member
    October 22, 2007 at 14:49
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Great. This fixed it for me too.

    Thx!

  • raul

    Member
    October 22, 2007 at 15:07
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Oh! Yes, you are in right! I have seen that the font is in both the two directories.
    Sorry, I have to correct myself.
    The problem was in the construction of the $config_fontpath, but recursively, I found the mistake in the $config_homedir. During the setup process I left if as default (/var/www/pandora_console/) while it should be /var/www/html/pandora_console.

    Well, surely it is not a software bug, but probably other persons could find this error. So that, it could be useful to check it before gonig mad with probably uninstalled dependencies as happened to me.

    😀 Sure, a lot of people doesn’t read the instructions :-D.
    I quote the text included in the install.php file:
    [code:1]
    Full path to HTTP publication directory
    For example /var/www/pandora_console/. Needed for graphs and attachments.

    Raúl

  • Robb11

    Member
    October 22, 2007 at 16:05
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yes, you are in right. By the way, it seemed to have auto-detected the path. I did not see the missing ‘/html/’ in the middle. 😀
    Btw, I am glad to have helped someone!