I'm looking for some help after 2 days of trying to figure this out.
I've been trying to get the latest debian versions of apache-ssl with
php and mysql working.
I have these on my system:
> php3 3.0.7-2 A server-side, HTML-embedded scripting langu
> php3-doc 3.0.7-2 Documentation for PHP3
> php3-mysql 3.0.7-2 Mysql module for PHP3 (apache)
> apache-common 1.3.6-9 Support files for all Apache webservers
> apache-doc 1.3.6-9 Apache documentation
> apache-ssl 1.3.6.4+1.32-1 Versatile, high-performance HTTP server with
I have a simple little program I'm trying to run:
> <html>
> <head><title>Database Sample Index</title></head>
>
> <h1>Data from mytable</h1>
>
> <?
> mysql_connect("localhost", "webuser", "");
> $query = "select name, phone from mytable";
> $result = mysql_db_query("example", $query);
>
> if ($result) {
> echo "Found these entries in the database:<url>";
> while ($r = mysql_fetch_array($result)) {
> $name = $r["name"];
> $phone = $r["phone"];
> echo "<li>$name, $phone";
> }
> echo "</u1>";
> } else {
> echo "No data.";
> }
> mysql_free_result($result);
> ?>
>
> <p><a href="add.php3">Add new entry</a>
> </body>
>
The table and data in it all exist, and can be viewed under mysql just
fine. However, when I execute (under netscape) this I get an error:
> Data from mytable
>
> Fatal error: Call to unsupported or undefined function mysql_connect()
> in /var/www/example/index.php3 on line 7
Now, from all I can figure out this means that
/usr/lib/apache/1.3/libphp3.so doesn't know what the mysql_ commands
mean. Basic php commands work however, such a phpinfo().
Can anyone help?
Thanks.
Billy Harvey