Strange fatal error in terminal

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • geevaa

    Strange fatal error in terminal

    Hi group,

    My program is

    <?php
    mysqli_connect( 'ns1','tdphp8', 'tdphp8')or die('connection error');
    print'hai';
    ?>
    =============== =============== =============== ==============
    my output is

    [tdphpadmin@conw s60 ~/public_html/demo]$ php sql.php
    PHP Fatal error: Call to undefined function mysqli_connect( ) in /
    home/
    tdphpadmin/public_html/demo/sql.php on line 2
    X-Powered-By: PHP/5.2.0
    Content-type: text/html
    =============== =============== =============== ==============

    In the web browser,Everyth ing works good and
    i am not getting the error or die message.
    actually database connection is established and data insertion data
    retrival are sucessfull
    but i am receiving this error in terminal.

    please help

  • Hendri Kurniawan

    #2
    Re: Strange fatal error in terminal

    geevaa wrote:
    Hi group,
    >
    My program is
    >
    <?php
    mysqli_connect( 'ns1','tdphp8', 'tdphp8')or die('connection error');
    print'hai';
    ?>
    =============== =============== =============== ==============
    my output is
    >
    [tdphpadmin@conw s60 ~/public_html/demo]$ php sql.php
    PHP Fatal error: Call to undefined function mysqli_connect( ) in /
    home/
    tdphpadmin/public_html/demo/sql.php on line 2
    X-Powered-By: PHP/5.2.0
    Content-type: text/html
    =============== =============== =============== ==============
    >
    In the web browser,Everyth ing works good and
    i am not getting the error or die message.
    actually database connection is established and data insertion data
    retrival are sucessfull
    but i am receiving this error in terminal.
    >
    please help
    >

    Check whether or not the extension for mysqli is loaded,
    because I know some server will have different configuration
    between the CLI and the HTTP server (assuming Apache)

    Thus in CLI, extension will not be loaded.

    Hendri Kurniawan

    Comment

    • gosha bine

      #3
      Re: Strange fatal error in terminal

      On 02.05.2007 06:08 geevaa wrote:
      Hi group,
      >
      My program is
      >
      <?php
      mysqli_connect( 'ns1','tdphp8', 'tdphp8')or die('connection error');
      print'hai';
      ?>
      =============== =============== =============== ==============
      my output is
      >
      [tdphpadmin@conw s60 ~/public_html/demo]$ php sql.php
      PHP Fatal error: Call to undefined function mysqli_connect( ) in /
      home/
      tdphpadmin/public_html/demo/sql.php on line 2
      X-Powered-By: PHP/5.2.0
      Content-type: text/html
      =============== =============== =============== ==============
      >
      In the web browser,Everyth ing works good and
      i am not getting the error or die message.
      actually database connection is established and data insertion data
      retrival are sucessfull
      but i am receiving this error in terminal.
      >
      please help
      >
      most possible, standalone php uses wrong php.ini

      does this

      php -r "phpinfo(); " | grep php.ini

      print what you expect?


      --
      gosha bine

      extended php parser ~ http://code.google.com/p/pihipi
      blok ~ http://www.tagarga.com/blok

      Comment

      Working...