PHP open_basedir Problem

Discussion in 'Installation/Configuration' started by scandal32, Aug 5, 2010.

  1. scandal32

    scandal32 New Member

    Hi. I've encounteres problem with open_basedir option with MOD-PHP. First of all after creating new website there's a few paths in line PHP open_basedir in "WEB DOMAIN -> OPTIONS". One of that path is /srv/www/mydomain. Howevere there's no such path created automaticlu (there's only /srv). Anyway my problem is that I install Shop application that somehow uses PHP open_basedir function and ISP Logs says: "permission denied" and installation hangs. I cannot remove those paths from OPTIONS (it says: path can't be empty) so I just # it in apache2/sites-enabled/mydomain.vhost. Is that function PHP open_basedir important? Does my trick is ok or it can cause malfunctions?
     
  2. kwickcut

    kwickcut Member

    under options are you talking about Apache directives i have nothing listed under any of my sites and have no troubles
     
  3. scandal32

    scandal32 New Member

    Php ...

    Hi. Thanks but DIRECTIVES are empty.... I was talking about path below DIDECTIVES ... see the path is

    /srv/www/skrzypczynscy.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin

    where apache has no access sicnce it doesn't work as a root
     

    Attached Files:

  4. kwickcut

    kwickcut Member

    ooo wat version of ispconfig are you running i dont have that line

    [​IMG]
     
  5. scandal32

    scandal32 New Member

    Php

    I'm using newest version 3.0.2.2
     
  6. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Post your ipen_basedir settings and the exact error messages from the error.log
     
  7. scandal32

    scandal32 New Member

    Error

    Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/usr/share/php/Zend/Translate/Adapter/Translate_Adapter_STXml.php) is not within the allowed path(s): (/var/www/clients/client51/web104/web:/var/www/clients/client51/web104/tmp:/var/www/motkolandia.pl/web:/srv/www/motkolandia.pl/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin)


    Which is right because apache cant get to /srv/www/motkolandia.pl/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin.
     
  8. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Your zend installation is in /usr/share/php and you missed to add this path to the open_basedir. The solution is to add:

    :/usr/share/php

    at the end of the open basedir path in this site. If other sites shall be able to use this path as well, then add it in the system settings too.
     
  9. scandal32

    scandal32 New Member

    Php



    can you tell me what "system settings", because adding only to apache2/sites-enabled/mydomain.vhost doesn't work
     
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The one that you listed above. From your post:

    "First of all after creating new website there's a few paths in line PHP open_basedir in "WEB DOMAIN -> OPTIONS""

    And if you need this for all websites, add it to system > server config > web too.

    Never edit a vhost file directly. All your changes will get removed automatically.
     

Share This Page