Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    166
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    166
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

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

    anyone ?:confused:

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

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

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

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice