473,396 Members | 1,907 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.

Unable to connect database from php

25
[error] [client 0.0.0.0] PHP Fatal error: Call to undefined function mysql_connect() in C:\\Apache2.2\\htdocs\\databaseconnect.php on line 2

i write code like this
------------------------


<?php
mysql_connect("192.168.1.50", "admin", "admin");
mysql_select_db("sitedesign");
echo"hi";
?>
Aug 8 '07 #1
4 2494
ak1dnar
1,584 Expert 1GB
Since you Have posted this thread on the Php Articles Section, I have to move it to the Forum, Because Here Only you can get answers for your Question. Please wait until one of our expert/member comes to the thread.

Thanks and regards,
-ajaxrand
Aug 8 '07 #2
ak1dnar
1,584 Expert 1GB
By reading that error what I can say actually, There is NO proper configuration on your System. what is your operating system ?

And Also Always Trap Your Errors Like this with predefined functions like mysql_connect()

Expand|Select|Wrap|Line Numbers
  1. mysql_connect("localhost", "root", "dba") or die(mysql_error());
  2.  
Aug 8 '07 #3
rizwan6feb
108 100+
-------------------------------------------------------------
Aug 8 '07 #4
kovik
1,044 Expert 1GB
PHP Fatal error: Call to undefined function mysql_connect() in C:\\Apache2.2\\htdocs\\databaseconnect.php on line 2
That error means that you have not installed MySQL in PHP. Check your php.ini file for any lines dealing with the MySQL extension and make sure they are uncommented (no semicolon at the start of the line).
Aug 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: programer | last post by:
Can I use Activex (as vb) to connect database when I use vc.net.
2
by: Mathew | last post by:
Can any one pls help me, How to connect SQL Server database thru vb.net. But it gives an error. I tried to connect thru SQLDataAdapter. General network error. Check your network documentation. ...
3
by: venkatesh | last post by:
hai to everybody I need to know how to connect database ms access or oracle with c or c++? please if u know tell I am interested in doing project with c thanks in advance....
1
by: arun_kumar112 | last post by:
HI , I am new member of this comminity, let me introduce first, i am MCA final year student, doing a project on network system, and database . will you tell me how can we connect database (...
1
by: nagendra prasad | last post by:
how to connect database for visualbasic using ADO
5
by: raghu4uon | last post by:
hi Can anyone give source code to connect oracle 8 database to my java project????? i'm using jdk1.5, tomcat 5.5.9 web server, oracle 8..... i have created the tables but i dont know how to...
3
by: Raymond Chiu | last post by:
Dear All, I have posted my question as below. But no answers, hope it can found here. ...
3
by: iedayah88 | last post by:
can sombody help me..after i create database in oracle.. what i must do to connect database and sql.. it's i must setup odbc first? is yes, how to setup odbc in localhost?
2
by: chetan ghadiya | last post by:
how to connect database in vb ?
1
by: rishiverma | last post by:
how to connect database create in sql server ,to my web site upload on domain.
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.