mysqli_connect() problem

Discussion in 'Installation/Configuration' started by Joffar, Feb 26, 2006.

  1. Joffar

    Joffar New Member

    Hi,
    I just installed ISPconfig, and got everything working fine with that. It appears like a great tool for webserver management, and I am eager to test it out more...

    However I had some issues when adding a site. It doesnt state anywhere in the manual where to add any include files in a php doc. I ended up adding them to /usr/share/php which is the default share for include files (according to php.ini), however if adding additional sites shouldnt there be a folder for user where they should add include files as default and php finding them without a full path?

    Additionally, I am currently unable to get past this error:
    PHP Fatal error: Call to undefined function mysqli_connect() in /usr/share/php/
    I also tried mysql_connect with the same result. I am trying to connect to the db from the /usr/share/php folder.

    Any help with this issue is appriciated.

    Thank you.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The better way of including PHP files is to include them by absolute or relative path, not with the global PHP include directory. I dont know any wider known script that is relying of this old functionality anymore, so its better to not write new scripts like this.

    If you want to use an include dir anyway, you can specify it with php_admin_flag directives in the apache directives window.

    You have to install the php-mysql and php-mysqli extensions from your linux distribution.
     
  3. Joffar

    Joffar New Member

    I guess I have some rewriting of include files to do then :)

    I am very new at Linux... I used the following command
    apt-gt install php4-mysql php5-mysqli and the system responded:
    I still get the same mysql / mysqli connect error...
    Do I have to enable it in php.ini somehow?

    What am I doing wrong??

    Help...
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Are you using PHP4 or PHP5?
    Is the MySQL module enabled in your php.ini?
     
  5. Joffar

    Joffar New Member

    I think I got it figured out now... I got the mysql_connect() to work. But have a couple of questions, why doesnt ISPConfig insert this mysql module when php is activated when creating a php enabled site?

    Another question, I think mysqli will not work because the install was with mysql 4.0.24, and I believe that you have to go to mysql 4.1 or something before it gets valid. So what is the easiest way to upgrade to mysql 4.1.# or even 5.0 ?

    Will an upgrade intereferre with ISPConfig, or cripple it in anyway?

    Thank you for all the help!.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Why should ISPConfig do that? ISPConfig is not configuring the php.ini file at all, this part belongs to your linux distribution.

    Search for a newer package for your linux distribution.

    This might be. If all databases remain intact and you configure your new mysql to support network connections, it should work with MySQL 4.1. MySQL 5 has not een tested yet with ISPConfig.
     
  7. Joffar

    Joffar New Member

    Thank you!
     

Share This Page