Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL 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
 
Old August 23rd, 2007, 12:20 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default mysql and PHP

I am using Mysql 5.0 and PHP 5.2.3 in XP. I can't connect php to mysql and get the error:
Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Group\Apache2\htdocs\connect.php
  even though I followed all the steps I am supposed to follow:

1. activate mysqli.dll in my.conf of mysql
2. copy it into window/system 32
3. change the directory path
4. copy php file and paste it in windows
5.restart apache
I did everything possibly I could do with the information availaable everywhere including the book. Nothing worked! I used this command:
 <?php
$con = mysqli_connect("localhost","root","looser");
if (!$con { die('Could not connect: ' . mysql_error());}
mysql_close($con);
?>

am i supposed to use mysqli or mysql.. The error was on no matter what I did.. please help i am using XP
Thanks

 
Old September 6th, 2007, 01:06 PM
Authorized User
 
Join Date: Sep 2007
Posts: 56
Thanks: 0
Thanked 1 Time in 1 Post
Default

Verify that your installation of PHP has been compiled with mysql support. Create a test web page containing <?php phpinfo();?> and load it in your browser. Search the page for MySQL. If you don't see it, you need to recompile PHP with MySQL support

http://mynameissteve.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP-MySql imhappy Beginning PHP 1 September 24th, 2008 05:44 AM
MySQL/PHP Help blackout Beginning PHP 1 August 8th, 2006 07:49 AM
begin php & mysql - chapter 12, user_form.php jon_stubber Beginning PHP 1 March 9th, 2006 10:57 AM
MySQL/PHP Gyhth PHP Databases 3 May 27th, 2005 08:21 PM
Using PHP with MySQL nav Beginning PHP 1 September 5th, 2004 04:02 AM





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