PHP not Communicating with MySQL
| From: | Jason Willer | Date: | Fri, 10 Nov 2000 19:25:50 +0000 |
| Subject: | PHP not Communicating with MySQL | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-716@lists.php.net to get a copy of this message | ||
Well, I finally got PHP4 compiled and make'd (is that a word :] ) with MySQL and apache.
I'm running PHP4, MySQL 3.22.32, and apache 1.3.9 on Solaris 7. But I'm having a problem
doing simple communication from a PHP script to MySQL. My apache and MySQL logs are not giving me
any errors and I don't know where to find the PHP error log so at this point I'm at a loss
and I don't know where to go from here. I can manually insert data into a MySQL table without
problem and apache is processing PHP code just fine. It just seems to be a problem with PHP
communicating with MySQL. Here's the simple piece of code I'm trying to implement:
<html>
<body>
<?php
mysql_connect("localhost");
mysql_select_db("aaa_roster");
mysql_query("INSERT INTO roster (first_name)
VALUES ('Fronjohnson')");
mysql_close();
print ("<h1>This script is being processed!</h1>");
?>
</body>
</html>
The database (aaa_roster) already exists with a "first_name" field already inserted also.
Any ideas why this is happening and where I can find an error log to help me out? Once again, PHP
and MySQL seem to be working find by themselves.
Any help you can provide is much appreciated!!! THANKS!!!