Re: php4 and mysql on rh9 not cooperating

From: steven (steven.mestdagh_at_removethis.esat.kuleuven.ac.be)
Date: 01/17/04

  • Next message: LRW: "Re: help with SQL search through multiple tables"
    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.


  • Next message: LRW: "Re: help with SQL search through multiple tables"

    Relevant Pages

    • Re: wich database
      ... I plan to switch from an old database to a new one. ... I need security, speed and low cost. ... MySQL is an excellent choice. ... Do you WANT to use Linux? ...
      (comp.databases)
    • [UNIX] phpRank Multiple Security Vulnerabilities
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... phpRank also stores all the users' passwords in plaintext (Under the MySQL ... [reconnect to the mysql database] ... Missing authentication check: ...
      (Securiteam)
    • RE: MySQL 5.0 information leak?
      ... Traditionally the schema for a database is NOT secure information. ... The essential problem is relying on security by obscurity, ... Subject: MySQL 5.0 information leak? ... have publicly available credentials but noone should be able to see how the ...
      (Bugtraq)
    • [UNIX] PHPBB BBcode Process Vulnerability (DoS)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... WSS has found a vulnerability in <http://www.phpbb.com/> phpBB, ... Will cause the following data to be saved to the database: ... whitecell$ mysql -uuser -ppasswd ...
      (Securiteam)
    • RE: FreeBSD 5.3 MySQL Performance
      ... versions of Linux and FreeBSD for most tests. ... > popular with the ATA disk drive manufacturers. ... > Many companies have used FreeBSD and MySQL for years and years. ... it is not often that you have such a small database and such a large ...
      (freebsd-questions)