cannot read from above directory

Discussion in 'Server Operation' started by n3ls0n, Aug 13, 2009.

  1. n3ls0n

    n3ls0n New Member

    Hi all,

    i am sure some of you had already stumped on a case similar to mine, but i cannot find any pointers to the right directorion.
    The problem is this: I have a file conf.inc.php, which has the credentials to access the Mysql Database. According to some experts, this kind of file should not reside in the same directory has the website, but instead in a upper directory, for security reasons. I have done that, but it seems that although i have a include in the index.php file, the conf.inc.php never gets read and a Apache error appears on the webpage (Access denied for user 'apache'@'localhost' (using password: NO)).
    The directory tree is this:
    /html
    conf.inc.php
    /site
    index.php

    Odd stuff:
    1) if i copy the conf.inc.php into the /site directory, the website works perfectly (although the include file points to the above directory) canĀ“t understand this behaviour.
    2) if i add the apache user to mysql, the error says that there is no database selected.

    Any help would be appreciated.

    Thanks in advance,
    Nelson.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you go to the html directory and post the output of
    Code:
    ls -la
    ?
    Can you also post the Apache vhost configuration here?
     

Share This Page