473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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@conws60 ~/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,Everything 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

May 2 '07 #1
2 1961
geevaa wrote:
Hi group,

My program is

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

[tdphpadmin@conws60 ~/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,Everything 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
May 2 '07 #2
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@conws60 ~/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,Everything 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
May 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: inonzuk | last post by:
why strange you ask? here goes: I have been working with Php and Mysql for a week without any problems. Today I tried executing a php page that connects to mysql and creates a new database, I...
5
by: Brian Blazer | last post by:
Hello, I am playing around with pyGoogle and encountered an error that I have never seen, and I am unsure how to correct for it. Here is a code snippet: for r in data.results: print 'Title:...
0
by: Tony Johansson | last post by:
Hello! I get compile error when compiling using the command javac from the command terminal window(CMD). I have just two classes which are called HelloWorld.java and Slask.java. I have both...
2
by: Tony Johansson | last post by:
Hello! I get compile error when compiling using the command javac from the command terminal window(CMD). I have just two classes which are called HelloWorld.java and Slask.java. I have both...
6
by: kennethlou | last post by:
Hi, I am writing a program in C. The following error message appears: ************************************************************************** "XIO: fatal IO error 14 (Bad address) on X...
28
by: charlie | last post by:
Hi, I found an article on informit.com that talks about C++ casts http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=285&rl=1 The strange thing is the author says the following...
3
by: Bob Palank | last post by:
This is an issue for someone much wiser than I - perhaps a MVP will help? I color coded the following for readability. Running XP Pro and VC++.Net Express 2008 and vtk visualization software In...
1
by: pitjpz | last post by:
We have moved our Database to another server. The server it was on used SQL 4 and the new one its on now uses SQL5 the only problem we can find is that when you attempt to delete a record from...
8
by: =?GB2312?B?yum09MXt?= | last post by:
today I forgot to include some header,then I found the error message by the compiler is quite strange. so I want to know exactly the inner details of the compiler impletation,if possible. and I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.