Strange fatal error in terminal

Hi group,

My program is

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

[tdphpadmin [at] conws60 ~/public_html/demo]$ php sql.php
PHP Fatal error: Call to undefined function mysql_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,Everything works good and
I am not getting the error or die message.
The string hai is displayed in the browser.
Actually database connection is established and data,insertion data
retrieval are successful
But i am receiving this error in terminal.

please help
geevaa [ Mi, 02 Mai 2007 16:08 ] [ ID #1702948 ]

Re: Strange fatal error in terminal

On May 2, 3:08 pm, Geevaa <govivasa... [at] gmail.com> wrote:
> Hi group,
>
> My program is
>
> <?php
> mysql_connect('ns1','tdphp8','tdphp8')or die('connection error');
> print'hai';
> ?>
> ===========================================================
> my output is
>
> [tdphpadmin [at] conws60 ~/public_html/demo]$ php sql.php
> PHP Fatal error: Call to undefined function mysql_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,Everything works good and
> I am not getting the error or die message.
> The string hai is displayed in the browser.
> Actually database connection is established and data,insertion data
> retrieval are successful
> But i am receiving this error in terminal.
>
> please help

there are two php.ini files, have you made sure the settings for the
command line version are correct.
shimmyshack [ Do, 03 Mai 2007 06:51 ] [ ID #1703844 ]
PHP » alt.php » Strange fatal error in terminal

Vorheriges Thema: page loading !!
Nächstes Thema: difference between --enable-mbstring and --enable-mbstring=shared