php error when trying too login

Discussion in 'General' started by alexnz, Jun 23, 2006.

  1. alexnz

    alexnz New Member

    Fatal error: Call to undefined function: mysql_connect() in /var/www/lib/classes/db_mysql.inc.php on line 75

    i have double checked all my settings but i cant seem too get rid of this error, can anyone help?
     
  2. geek.de.nz

    geek.de.nz New Member

    If the function is not defined, this means that Apache/PHP cannot find the function in the libraries.
    Are you sure you installed the php mysql module and enabled it in php.ini? If you got a Debian based Linux try:
    Code:
    apt-cache search php mysql
    
    You should find something like 'php4-mysql' or similar. Then you can install it with
    Code:
    apt-get install php4-mysql
    
    Oh, and add this to your php.ini (at the end):
    Code:
    extension=mysql.so
    
    That's what I usually forget ;-).

    If you have php5 you install the corresponding module of course. ;-)

    Always mention your distro when you submit questions!
     
  3. alexnz

    alexnz New Member

    hi thanks for the reply

    im using debian sarge

    i have followed falko's perfect setup guide for debian 3.1,


    ive added extension=mysql.so too my php.ini file in apache2.conf and restarted apache2

    still getting the same error =/

    Code:
    dns:/var/www# apt-get install mysql-server
    Reading Package Lists... Done
    Building Dependency Tree... Done
    mysql-server is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    
    dns:/var/www# mysql -u mydns -p
    Enter password:
    
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 14 to server version: 4.0.24_Debian-10sarge2-log
    
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    
    mysql>
    
    
    hmmmmmmmmm im thinking of formatting agian and starting from scratch, but i cant seem too find where i screwed up? ive basicly gone through the setups guides twice but yet she doesnt want too work =/


    thanks for all the help, any more suggestions greatly appriacted :)
     
  4. alexnz

    alexnz New Member

    found this in apache2.logfile:

    Code:
    
    PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/20020429/msql.so' - /usr/lib/php4/20020429/ms
    
    [Fri Jun 23 17:18:12 2006] [notice] Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ssl/2.0.54 OpenSSL/0.9.7e mod
    
    


    hmm the file is definatly there:

    Code:
    dns:/usr/lib/php4/20020429# ls
    curl.so  domxml.so  gd.so  imap.so  ldap.so  mcal.so  mhash.so  mysql.so  odbc.so  xslt.so
    
     
    Last edited: Jun 23, 2006
  5. geek.de.nz

    geek.de.nz New Member

    I would try removing the mysql module first and reinstalling that instead of doing a total reformat.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Make sure you didn't make a typo in php.ini. It must be
    extension=mysql.so, not extension=msql.so...
     
  7. alexnz

    alexnz New Member

    woops ok i fixed that up

    now its coming up with the error:

    Code:
    DB::query(SELECT * FROM mb_sites WHERE name = '')
    mysql_query
    Table 'mydns.mb_sites' doesn't exist
    Warning: Cannot modify header information - headers already sent in /var/www/web/login/index.php on line 56
    i cant even see anywhere in the setup/installation guide where i even add mb_sites --- where have i gone wrong?
     
  8. geek.de.nz

    geek.de.nz New Member

    What is login/index.php? Did you write that yourself??

    What is line 56?

    MyDNS doesn't have that table (mb_sites), at least not in version 1.1.0, so it's no wonder it doesn't work.
     
  9. donjoaoresort

    donjoaoresort New Member

  10. falko

    falko Super Moderator ISPConfig Developer

    Which MyDNSConfig version did you install? On which distribution?
     
  11. albertjr

    albertjr New Member

Share This Page