HELLO
my name is bail im new to this forum i have got to chapter four of the book and im getting errors this is the code it says type;
<?
$link = mysqli_connect(‘localhost’, ‘root’, ‘bail’);
if (!$link)
{
$output = ‘unable to connect to the database server.’;
include ‘output.html.php’;
exit();
}
if (!mysqli_set_charset ($link, ‘utf8’))
{
$output = ‘unable to set database connecion encoding.’;
include ‘output.html.php’;
exit();
}
if (!mysqli_select_db($link, ‘ijdb’))
{
$output = ‘unable to locate the joke database.’;
include ‘output.html.php’;
exit();
}
$output = ‘DATABASE CONNECTION ESTABLISHED.’;
include ‘output.html.php’;
?>
but the problem i have is when i change the password like it say’s in book to test the password is working im getting error like this
Warning: mysqli_connect() [function.mysqli-connect]: (/838860800): in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2
could anyone give me any advise i have tryed reinstall of all the software a few times and all that happens is the number in the error keeps changing
thanks
thankyou for your reply yes neil i think its sorted i put a @ infront of $link = @mysqli_connect(‘localhost’, ‘root’, ‘bail’);it is working but this is not stated in the book at least i can got to the next chapter now thankyou i also have another question on the forum that no one as asnswered if you could answer that it would be big help thankyou for your help
bail
Warning: mysqli_connect() [function.mysqli-connect]: (/838860800): in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2
i have unistalled and reinstalled but all that changes is the number in the error
Warning: mysqli_connect() [function.mysqli-connect]: (/838860800): in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2
Are you making use of the errata for the book? It’s kind of important.
For example, the correction for page 12 might be of use for you.
[indent][list][*]p.12 Installing PHP[/list]
Although this book provides download and installation instructions for PHP 5.2, the newly-released (at the time of this writing) PHP 5.3 includes some new download options that aren’t covered in the book.
There are four different versions of PHP 5.3. for Windows: VC6 Non Thread Safe, VC6 Thread Safe, VC9 Non Thread Safe, and VC9 Thread Safe. Talk about confusing!
First of all, you definitely want a Thread Safe version of PHP. The Non Thread Safe versions are not suitable for use as a plugin for Apache.
Secondly, assuming you will install (or have already installed) a version of the Apache HTTP Server from httpd.apache.org (see page 13), you will need the VC6 version of PHP.
In short, to follow the instructions in this book, you need the VC6 Thread Safe version of PHP 5.3 for Windows.[/indent]
hi pmw i have tryed all that and still same its doin me head in i got it workin on my main comp fine just laptop wont have it back to drwing board thanks bail
the extension=php_mysqli.dll does not have the ; i removed it like the book says i all so downloaded the one pmw said and installed it and now im getting this error mysqladmin: connect to server at ‘localhost’ failed
error:'access denied for user ‘root’@‘localhost’ (using password:yes)
but i know 100% the passwoed is correct
i would like to say thanks to everyone who is trying to help me sort this problem out
mysqladmin -u root -p password "newpassword " i have put new password were it says then it says press enter then enter again with out the password then mysqladmin -u root-p statuse then enter passwoed
thanks bail