The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fatal error: Call to undefined function: mysql_connect()

Discussion in 'General Discussion' started by khoonchee, Sep 15, 2003.

  1. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I have setup a cron job in Cpanel which will send the output to my email but the output returns the following in the email :

    Fatal error: Call to undefined function: mysql_connect() in /home/user/public_html/database.php on line 4

    The command which I used in Cpanel is :

    php -f /home/user/public_html/digest.php

    Below is the line in database.php on line 4 :

    $db = mysql_connect("localhost", "user_db", "password");

    When I execute the command directly in shell or run the script directly from the web browser, there is no error return.

    Am I missing something on the server part?

    Thanks,

    cPanel.net Support Ticket Number:
     
  2. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Does any one have guides about this?

    I have tried recompile the php with the '--with-mysql=/usr' but getting the error message when I run the make command :

    /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
    /usr/bin/ld: Dwarf Error: Invalid or unhandled FORM value: 14.
    ext/mysql/php_mysql.lo: In function `zif_mysql_create_db':
    /exa/php-4.3.2/ext/mysql/php_mysql.c:1115: undefined reference to `mysql_create_db'
    ext/mysql/php_mysql.lo: In function `zif_mysql_drop_db':
    /exa/php-4.3.2/ext/mysql/php_mysql.c:1157: undefined reference to `mysql_drop_db'
    collect2: ld returned 1 exit status
    make: *** [sapi/cli/php] Error 1

    Thanks,

    cPanel.net Support Ticket Number:
     
  3. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    anyone ?:confused:

    cPanel.net Support Ticket Number:
     
  4. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    ok...

    recompiled the apache with php and fixed the problem....:p

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page