Re: php4 and mysql on rh9 not cooperating
From: steven (steven.mestdagh_at_removethis.esat.kuleuven.ac.be)
Date: 01/17/04
- Previous message: J.O. Aho: "Re: help with SQL search through multiple tables"
- In reply to: dave: "php4 and mysql on rh9 not cooperating"
- Next in thread: ilo: "Re: php4 and mysql on rh9 not cooperating"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 17 Jan 2004 20:30:02 GMT
dave <dmehler26@woh.rr.com> wrote:
> Hello,
> I'm trying to get php4, apache2, and mysql3.23 to work on an rh9 machine.
> ...
> this returned no errors. Again, from the mysql commandline i can log in as
> this user, and use the database. I can query it, and add/delete information
> from it. My problem comes when i try to access the database via a web page,
> both httpd and mysql are on the same box, and i get an access denied
> message. Here's my connect string:
>
> $connection = mysql_connect("localhost","DatabaseUser","password");
> mysql_select_db("example", $connection);
you should start by analyzing your log files (usually in /var/log) to
figure out what is going wrong. in httpd.conf, turn on warning and error
displaying/logging if it's not activated already.
i have no experience with rh9 but maybe your apache is running in a chroot
environment for security? (a kind of jail outside which the web server
cannot access anything). in that case, you can try one of the following
(the last option seems best from a security point of view.)
- disable the chroot (check apache documentation)
- use '127.0.0.1' instead of 'localhost' to connect,
- create a softlink to the mysql socket (mysql.sock) in the chroot
directory and copy /etc/hosts and /etc/resolv.conf to the chrootdir
(usually /var/www, so the files become /var/www/etc/hosts etc.)
hope this helps,
steven.
- Previous message: J.O. Aho: "Re: help with SQL search through multiple tables"
- In reply to: dave: "php4 and mysql on rh9 not cooperating"
- Next in thread: ilo: "Re: php4 and mysql on rh9 not cooperating"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|