I think that was just an extraordinarily unlikely typo. I had heard of both mysql and mysqli, and I knew I was looking for mysql. Or maybe I just copied and pasted it from somewhere without noticing the 'i'.
Thanks for the tips, I'm sure they would have worked, but after changing so many settings over the past few days, I figured that even if I had fixed the problem, one of my other changes would have messed it up and I wouldn't know...
User Profile
Collapse
-
Ok, thanks. I've done that, restarted Apache and computer, but it's still not working. PHP seems to work just as before, but still returns "Bad" when I run that script.
I've read a few things and looked through my php.ini. I found this:
extension_dir=" C:\Program Files\PHP\ext"
The phpinfo() function also returns that directory as the extension location. When I look in that PHP...Leave a comment:
-
Thanks for your responses; I think Atli got it. I ran this script:
It returned "Bad", so the MySQL extension for PHP is not installed. Is this the kind of thing that PHP would exclude when I choose the Recommended settings during its installation?...Code:<?php if (function_exists('mysql_connect')) { echo "Good<br />\n"; } else { echo "Bad.<br />\n"; } ?>Leave a comment:
-
mysql_connect function isn't working
Hi all. I've recently set up Apache 2.2 with PHP 5.2 and MySQL 5.1. I played around with SQL a bit, and now I'm trying to access it with PHP. I currently have the code:
...Code:<?php # error_reporting(E_ALL); # ini_set('display_errors', true); echo "test"; $link = mysql_connect('localhost', 'root', '[mypassword]'); if (!$link) { die('Could not connect: ' . mysql_error());
No activity results to display
Show More
Leave a comment: