Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old September 27th, 2004, 03:06 PM
Registered User
Join Date: Sep 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default I just want to get a successful connection

I'm having a big problem, which I haven't been able to figure it out. I'm running PHP 5, Apache, and MySQL 5.0.... and the following code, which always give me a 'call to undefined function mysql_connect(),' doesn't work:
  $link = mysql_connect("host", "user", "pass") or die ("sorry");
I've read the documentation on php.net and mysql.com to find out what's wrong with it. I tried to use mysqli_connect, because apparently the function 'mysql_connect()' doesn't work with versions of mysql 4.1 and above. Well, 'mysqli_connect()' doesn't work either, I still get the same error. The documentation suggests that I use "--with-mysqli=mysql_config_path/mysql_config configuration option where mysql_config_path represents the location of the mysql_config program that comes with MySQL versions greater than 4.1." So now the question is, where do I find this configuration option to change it and is there evidence that it will work. I was really excited to get to learn this until this %%%*&^&* error message appeared. Any help would be greatly appreciated. Thanks.

  #2 (permalink)  
Old September 28th, 2004, 01:32 AM
Friend of Wrox
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr

Check your connection string

and also look forward for the MySQL other postings

Gokulan Ethiraj

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload successful but no file ! ionut_brasov Beginning PHP 1 August 3rd, 2007 04:01 AM
Connection prasanta2expert ASP.NET 2.0 Basics 5 November 7th, 2006 06:21 AM
open connection in another connection adityamadisetty SQL Server 2000 1 May 4th, 2006 04:56 AM
Connection zaeem Dreamweaver (all versions) 1 May 1st, 2005 04:57 AM
Connection Help morpheus Classic ASP Basics 2 February 3rd, 2005 09:09 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.