Re: Apache + PHP3 + MySQL = big mess
You are probably missing the php3-mysql package. I
had similar problems with getting imap to work until I
installed the php3-imap package. Give that a shot
Dustin
--- Oliver Hingst <oliverh@technomancer.f9.co.uk>
wrote:
> Hello,
> I am using Debian "Potato" and I use Apache, PHP3
> and every modules
> containing "php3" and "mysql" and MySQL server and
> client.
> I am going through a tutorial on DevShed
> (http://www.devshed.com) on
> creating a web database. I have checked that PHP3
> has been installed
> and runs properly. No problems there. I checked
> the MySQL
> configuration and set-up the relevant users and
> permissions. No
> problems there, either. I then had a look at my
> httpd.conf file, to see
> what modules were being loaded. I saw that the
> libphp3.so and a
> mod_auth_mysql.so are uncommented. I then wrote
> this PHP3 script:
>
> <html>
> <head><title>Web Database Sample Index</title>
> </head>
>
> <body bgcolor=#ffffff>
> <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:<ul>";
> while ($r = mysql_fetch_array($result)) {
> $name = $r["name"];
> $phone = $r["phone"];
> echo "<li>$name, $phone";
> }
> echo "</ul>";
> } else {
> echo "No data.";
> }
> mysql_free_result($result);
> ?>
>
> <p><a href="add.php3">Add new entry</a>
> </body>
> </html>
>
> Running this script gives me this error:
> Fatal error: Call to unsupported or undefined
> function mysql_connect()
> in /var/www/example/index.php3 on line 8
>
> What am I missing ?
>
> Oliver
>
>
> --
> Unsubscribe? mail -s unsubscribe
> debian-user-request@lists.debian.org < /dev/null
>
>
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Reply to: