Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,696 Actually, mysql is connect to PHP, not to Apache and no, they don't have to be in the same directory. The php.ini file on your system must have a line like this:
extension=mysql.so (or mysql.dll... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,696 I remember having connection problems when I started which I resolved by appending the mysql socket address to the host.
mysql_connect (host:socket, username, password)
I can't remember... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,696 Try opening a command window and check if you can connect with the root user and 'password' as a password:
> mysql -u root -p
Enter password: password
(make sure the mysql command is in your... |
Forum: PHP Mar 11th, 2008 |
| Replies: 35 Views: 2,696 Since it's the only place left with no error detection, how about trying:
if (!mysql_select_db("users", $con))
die ("Database 'users' not found"); |