Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-29 Thread Goltsios Theodore
|Why don't you try this:| |?php| |$mysqli = new mysqli(localhost, my_user, my_password, world);| || |/* check connection */| |if (mysqli_connect_errno()) {| |printf(Connect failed: %s\n, mysqli_connect_error());| |exit();| |}| || |printf(Host information: %s\n, $mysqli-host_info);| || |/*

Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-29 Thread Goltsios Theodore
Reposting the code sorry: ?php $mysqli = new mysqli(localhost, my_user, my_password, world); /* check connection */ if (mysqli_connect_errno()) { printf(Connect failed: %s\n, mysqli_connect_error()); exit(); } printf(Host information: %s\n, $mysqli-host_info); /* close connection */

Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-28 Thread Goltsios Theodore
Well if you are in the unix case then you should check if your php supports mysqli :-) . In either case unix or not you could use phpinfo: ?php phpinfo(); ? This will show a lot useful information about what your web server and your php can or cannot do. Linux NG/Lists wrote: The book

Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-28 Thread Linux NG/Lists
Goltsios Theodore wrote: Well if you are in the unix case then you should check if your php supports mysqli :-) . In either case unix or not you could use phpinfo: ?php phpinfo(); ? Oh, sorry, I thought I posted this before. Looks like I didn't. I'm pretty sure it supports mysqli:

Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-27 Thread Linux NG/Lists
The book I'm working with (PHP MySQL Web Dev, Welling/Thompson) specifically defines the 'new mysqli' syntax. So I'm guessing I don't have something configured right? If one works the other should too. Your code here looks fine according to the manual

Re: [PHP-DB] $db=new mysqli fails while $db=mysqli_connect succeeds in PHP/MySQL 5

2007-08-26 Thread Chris
Linux NG/Lists wrote: From a php-general thread earlier: ?php $db=new mysqli('localhost','whil','secret','test'); ? generates: Fatal error: Call to undefined function new mysqli() in index.php on line 24 while ?php $conn = mysqli_connect(localhost,whil,secret,test); echo