Mysql Fatal error

Discussion in 'Installation/Configuration' started by countzero, Jun 12, 2006.

  1. countzero

    countzero New Member

    Hi,

    I just installed ISPConfig 2.2.3, the installation process was succesful but now, when I try to access the admin interface, I get the following error message:

    Fatal error: Call to undefined function mysql_connect() in /home/admispconfig/ispconfig/lib/classes/ispconfig_db_mysql.lib.php on line 78

    That error appears when I click on the homepage login button.

    I checked php -i in order to know whether PHP was compiled with mysql support or not and it seems to be OK:

    mysql

    MySQL Support => enabled
    Active Persistent Links => 0
    Active Links => 0
    Client API version => 4.1.20
    MYSQL_MODULE_TYPE => external
    MYSQL_SOCKET => /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE => -I/usr/local/lib/mysql/include
    MYSQL_LIBS => -L/usr/local/lib/mysql/lib -lmysqlclient

    Directive => Local Value => Master Value
    mysql.allow_persistent => On => On
    mysql.connect_timeout => 60 => 60
    mysql.default_host => no value => no value
    mysql.default_password => no value => no value
    mysql.default_port => no value => no value
    mysql.default_socket => no value => no value
    mysql.default_user => no value => no value
    mysql.max_links => Unlimited => Unlimited
    mysql.max_persistent => Unlimited => Unlimited
    mysql.trace_mode => Off => Off


    It makes me crazy ;) If someone could help me if would be very great!

    Thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in /var/log/ispconfig_install.log?
    This shows only your normal PHP. ISPConfig comes with its own PHP: /root/ispconfig/php/php.
    Did you change anything in ISPConfig before or after you installed it?
     
  3. countzero

    countzero New Member

    Thank your for your response.

    Here is my /var/log/ispconfig_install.log (sorry the file is long ...):

    Sun Jun 11 23:37:01 CEST 2006 - [ISPConfig] - installation directory: /tmp/install_ispconfig
    Sun Jun 11 23:37:01 CEST 2006 - [ISPConfig] - operating system: CentOS 4.3
    Sun Jun 11 23:37:04 CEST 2006 - [ISPConfig] - Neuinstallation eines ISPConfig-Systems. / Installation of a new ISPConfig system. / Installation d'ISPConfig sur un nouveau système.
    Sun Jun 11 23:38:01 CEST 2006 - [ISPConfig] - selected language: en
    Sun Jun 11 23:38:03 CEST 2006 - [ISPConfig] - installation note accepted
    Sun Jun 11 23:38:03 CEST 2006 - [ISPConfig] - licence accepted
    Sun Jun 11 23:38:05 CEST 2006 - [ISPConfig] - installation mode: standard
    Sun Jun 11 23:38:06 CEST 2006 - [ISPConfig] - mail: postfix
    Sun Jun 11 23:38:06 CEST 2006 - [ISPConfig] - dist_mail=postfix ##
    Sun Jun 11 23:38:06 CEST 2006 - [ISPConfig] - dist_mail_log=/var/log/maillog ##
    Sun Jun 11 23:38:06 CEST 2006 - [ISPConfig] - dist_mail_virtusertable=/etc/postfix/virtusertable ##
    Sun Jun 11 23:38:06 CEST 2006 - [ISPConfig] - dist_mail_local_host_names=/etc/postfix/local-host-names ##
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - ftp: proftpd
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - dist_ftp=proftpd ##
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - dist_ftp_conf=/etc/proftpd.conf ##
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - dist_ftp_version=standalone ##
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - dist_ftp_log=/var/log/xferlog ##
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - procmail found: /usr/bin/procmail
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - quota found: /usr/bin/quota
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - mysql found: /usr/bin/mysql
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - openssl found: /usr/bin/openssl
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - named found: /usr/sbin/named
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - iptables found: /sbin/iptables
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - httpd found: /usr/sbin/httpd
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - httpd syntax ok!
    Sun Jun 11 23:38:09 CEST 2006 - [ISPConfig] - dist_path_httpd_root=/home/www ##
    Sun Jun 11 23:38:16 CEST 2006 - [ISPConfig] - Directory /var/www/sharedip created.
    Sun Jun 11 23:38:16 CEST 2006 - [ISPConfig] - Use sharedip_index.html_en as SharedIP default page.
    Sun Jun 11 23:47:33 CEST 2006 - [ISPConfig] - unpacked ISPConfig system
    Sun Jun 11 23:47:33 CEST 2006 - [ISPConfig] - moved directory ispconfig_tmp to /root/ispconfig
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 931: copied directory scripts to /root/ispconfig/
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 932: copied directory sv to /root/ispconfig/
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 935: copied directory isp to /root/ispconfig/
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 936: copied cronolog to /root/ispconfig/
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 937: copied cronosplit to /root/ispconfig/
    Sun Jun 11 23:48:07 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 945: copied ispconfig_server to /etc/rc.d/init.d
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 959: copied directory ispconfig to /home/admispconfig/ispconfig
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 960: chown -R admispconfig:admispconfig /home/admispconfig
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 963: chown -R admispconfig:mysql /home/admispconfig/ispconfig/backup
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 964: chmod -R 770 /home/admispconfig/ispconfig/backup
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 996: cp -f /etc/proftpd.conf /etc/proftpd.conf.orig
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - Connected successfully to MySQL server
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1075: read in db_ispconfig.sql
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1077: rm -f db_ispconfig.sql
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1140: chmod 600 /home/admispconfig/ispconfig/lib/config.inc.php
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1141: chown admispconfig:admispconfig /home/admispconfig/ispconfig/lib/config.inc.php
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1197: cp -f /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1233: create /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf
    Sun Jun 11 23:48:08 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1235: create /var/log/httpd/ispconfig_access_log
    Sun Jun 11 23:48:09 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 573: /etc/rc.d/init.d/crond restart
    Sun Jun 11 23:48:09 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1290: cp -f /etc/postfix/main.cf /etc/postfix/main.cf.orig
    Sun Jun 11 23:48:09 CEST 2006 - [ISPConfig] - created virtusertable entry in /etc/postfix/main.cf
    Sun Jun 11 23:48:09 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1298: create /etc/postfix/virtusertable
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1299: postmap /etc/postfix/virtusertable
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - created mydestination entry in /etc/postfix/main.cf
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1307: create /etc/postfix/local-host-names
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1320: cp -f isp/conf/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1321: chmod 644 /etc/Bastille/bastille-firewall.cfg
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1344: cp -f security/bastille-firewall /etc/rc.d/init.d
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1345: chmod 700 /etc/rc.d/init.d/bastille-firewall
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1348: cp -f security/bastille-ipchains /sbin
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1349: chmod 700 /sbin/bastille-ipchains
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1352: cp -f security/bastille-netfilter /sbin
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1353: chmod 700 /sbin/bastille-netfilter
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1378: chmod 755 /home/admispconfig/ispconfig/tools/clamav/bin/trashscan
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1379: chown admispconfig:admispconfig /home/admispconfig/ispconfig/tools/clamav/bin/trashscan
    Sun Jun 11 23:48:11 CEST 2006 - [ISPConfig] - /tmp/install_ispconfig/install.php, Line 1393: delete /root/ispconfig/dist.inc.php
    Sun Jun 11 23:48:12 CEST 2006 - [ISPConfig] - httpd restart successful
    Sun Jun 11 23:48:14 CEST 2006 - [ISPConfig] - postfix restart successful
    Sun Jun 11 23:48:20 CEST 2006 - [ISPConfig] - file /root/ispconfig/dist.info deleted
    Sun Jun 11 23:48:21 CEST 2006 - [ISPConfig] - directory install_ispconfig deleted
    Sun Jun 11 23:48:21 CEST 2006 - [ISPConfig] - ##############################



    That's right! Just an error in my previous post, I used the true command: /root/ispconfig/php/php -i


    I modified /tmp/install_ispconfig/compile_aps/compile in order to make it possible to compile PHP (had some issues with zlib and I had to correct the mysql location). That modification was made before install. I replace:

    Code:
    ./configure --with-apxs=${INSTALL_ROOT}/httpd/bin/apxs --enable-track-vars --enable-sockets --enable-mbstring=all --with-config-file-path=${INSTALL_ROOT}/php --enable-ftp --prefix=${INSTALL_ROOT}/php ${WITH_OPENSSL} ${WITH_MYSQL} --disable-libxml --disable-dom --disable-xml ${WITH_ZLIB_DIR} --disable-xmlreader --disable-xmlwriter --disable-simplexml --without-pear || error "Could not configure PHP"
    by:

    Code:
    ./configure --with-apxs=${INSTALL_ROOT}/httpd/bin/apxs --enable-track-vars --enable-sockets --enable-mbstring=all --with-config-file-path=${INSTALL_ROOT}/php --enable-ftp --prefix=${INSTALL_ROOT}/php ${WITH_OPENSSL} --with-mysql=/usr/local/lib/mysql --disable-libxml --disable-dom --disable-xml --with-zlib-dir=/usr/local/lib --disable-xmlreader --disable-xmlwriter --disable-simplexml --without-pear || error "Could not configure PHP"
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Which linux distribution do you use?

    Have you compiled and installed your mysql manually? ISPConfig detects mySQL automatically and correct on all supported linux distributions, when you use the mysql packages from your linux distribution.
     
  5. countzero

    countzero New Member

    CentOS 4.3
    I used yum install <mysql-packages> to install mysql, following the perfect setup pages.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error did you get when you installed ISPConfig without twaeking the compile script?
    Did you install the mysql devel package from CentOS?
     
  7. countzero

    countzero New Member

    I got an error like:

    ERROR: Could not configure PHP
    The PHP binary coming with ISPConfig does not work properly on your system! The installation routine stops here!


    Yep, I've installed the mysql devel package from CentOS.
     
  8. falko

    falko Super Moderator Howtoforge Staff

Share This Page