Ad Widget

Collapse

Zabbix frontend Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • graemann
    Junior Member
    • Mar 2007
    • 2

    #1

    Zabbix frontend Problem

    What am I doing wrong?

    Here's my what I installed:
    RHEL 4
    zabbix-1.1.6
    php-5.2.1 with gd support and php-mysql
    mysql-5.0.27

    I am now running zabbix_server and zabbix_agentd in one machine. I have not edited any default zabbix config files.

    My https://localhost/zabbix/frontend/php/index.php is not showing.

    Note:
    apache User is nobody, thus nobody has permission to read zabbix files in frontend dir.
    phpinfo() is ok inside the frontend folder.


    What am I doing wrong?

    Thanks in advance.
    Last edited by graemann; 21-03-2007, 08:46. Reason: edited some mispelles words.
  • graemann
    Junior Member
    • Mar 2007
    • 2

    #2
    After reviewing the error logs, here's what I found:

    PHP Fatal error: Call to undefined function: mysql_connect() in /var/www/html/zabbix/frontend/php/include/db.inc.php on line 38

    Line 38 in the said file is:

    27 $DB_TYPE ="MYSQL";
    28 $DB_SERVER ="localhost";
    29 $DB_DATABASE ="zabbix";
    30 $DB_USER ="zabbixuser";
    31 $DB_PASSWORD ="zabbixpass";
    32 // END OF DATABASE CONFIGURATION
    33
    34 global $USER_DETAILS;
    35
    36 if($DB_TYPE == "MYSQL")
    37 {
    38 $DB=mysql_connect($DB_SERVER,$DB_USER,$DB_PASSWORD );
    39 if(!mysql_select_db($DB_DATABASE))
    40 {
    41 echo "Error connecting to database [".mysql_error()."]";
    42 exit;
    43 }
    44 mysql_select_db($DB_DATABASE);
    45 }

    Its how the mysql connection is established. When I tried connecting manually:

    $ mysql -u zabbixuser -pzabbixpass -h localhost
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 6 to server version: 5.0.27-standard-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | zabbix |
    +--------------------+
    3 rows in set (0.00 sec)

    The index.php page is not showing.

    Any ideas on this one? TIA.

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      It seems you do not have php-mysql module installed or configure properly. Check php.ini.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      Working...