LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-09-2004, 02:51 PM   #1
Christopher
LQ Newbie
 
Registered: May 2003
Posts: 27

Rep: Reputation: 15
MySQL commands not recognised by PHP4


Hi

I have installed Apache 1.3, and PHP4 is working fine with it. I also know that MySQL is up and running fine, and I have no problems using phpmyadmin. However, when it comes to using mysql_connect() I get the following error:

Fatal error: Call to undefined function: mysql_connect() in /home/crisp/www/myapp/dbconn.php on line 2

I have installed php4-mysql via apt-get, which is described as a package that "provides a module for MySQL database connections directly from PHP scripts", so I don't see what the problem is.

Any ideas? Thanks,

-Chris
 
Old 12-09-2004, 05:16 PM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Question: are you literally invoking just "mysql_connect()" or are you passing it the required parameters, for example
Code:
mysql_connect(localhost,$username,$password);
where localhost, $username, and $password are appropriate for your server and database. It may also be helpful to post the contents of the dbconn.php file (making sure to remove/disguise any actual login ID's, passwords, etc) My guess is that this error may just be due to a syntax error, although take that with a grain of salt -- I do not claim to be an expert by any stretch of the imagination.

Lastly, you may also want to ask this question in the Programming forum rather than the generic Software forum. If so, click on the Report This Post to a Moderator, and simply request that it be moved. -- J.W.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP4-MySQL TehIan Linux - Software 2 06-30-2005 01:51 PM
starting mysql client localhost not recognised? davidh_uk Linux - Software 6 05-10-2005 04:32 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
php4 mysql connectivity bm1 Programming 4 02-19-2004 06:23 PM
PHP4 MySQL configuration Gilion Linux - Software 7 02-02-2004 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration