open_basedir

  • Hey,



    Can you help me to fix this Problem?



    I want open this path with fopen: /var/log/mysql/error.log



    but everytime i try this i become this error:





    Code
    1. Warning: fopen(): open_basedir restriction in effect. File(/var/log/mysql/error.log) is not within the allowed path(s): (/var/www/virtual/rostiger-elch.de/:/usr/share/php/:/dev/random:/dev/urandom) in /var/www/virtual/rostiger-elch.de/htdocs/slogs.php on line 29
    2. Warning: fopen(/var/log/mysql/error.log): failed to open stream: Operation not permitted in /var/www/virtual/rostiger-elch.de/htdocs/slogs.php on line 29
    3. Warning: fgets() expects parameter 1 to be resource, boolean given in /var/www/virtual/rostiger-elch.de/htdocs/slogs.php on line 31
    4. Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/virtual/rostiger-elch.de/htdocs/slogs.php on line 35



    I have acticated that every domain have a own php.ini file.


    Please Answer in English or German

    Edited once, last by Stefan.Z ().

  • @Stefan.Z


    For security reasons, PHP scripts cannot access file outside the customer home folder (e.g. /var/www/virtual/<domain.tld>). If you want really give your customer the right to access this file, you must use the https://github.com/i-MSCP/imsc…p_confoptions_override.pl listener file.


    Thread closed.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206