PHP Problem

Discussion in 'Server Operation' started by nenad, Mar 10, 2006.

  1. nenad

    nenad ISPConfig Developer ISPConfig Developer

    Hi,

    I set up ISPCOnfig on Fedora Core 3.
    I insatlled Joomla!

    And I have a PHP problem:

    I can't turn off "safe mode".
    It is set as "off" in php.ini

    When I look at php info, there is information that:
    Local value for "Safe mode" is: ON
    Master value for "Safe Mode" is: OFF

    How can I set "LOCAL" value for php.ini ?
    And what are "local" and "master" values anyway ?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You must disable PHP Safe Mode for this web site in ISPConfig.
     
  3. nenad

    nenad ISPConfig Developer ISPConfig Developer

    How to change:

    memory_limit 8M 8M

    to 16M or 32M

    Changes in
    /root/ispconfig/php/php.ini
    or
    /etc/php.ini

    are accepted but not applied
     
  4. falko

    falko Super Moderator ISPConfig Developer

    That's the php.ini of ISPConfig, it has nothing to do with your main PHP.

    Please create a PHP script with
    PHP:
    <?php
    phpinfo
    ();
    ?>
    in it and access it in your browser. It will tell you the location of your php.ini. Then modify it and don't forget to restart Apache.
     
  5. nenad

    nenad ISPConfig Developer ISPConfig Developer

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    A general remark: This finds a file named php.ini. This must not be the php.ini used by your PHP setup.
     
  7. nenad

    nenad ISPConfig Developer ISPConfig Developer

    It finds:

    /etc/php.ini
    /root/ispconfig/php/php.ini
     
  8. schmidtedv

    schmidtedv New Member

    well, if I should disable popen() and proc_open() -functions in php.ini...should this be enough to change it for the user-webs or should / can I disable them in the ispconfig-php.ini too??

    See http://www.heise.de/security/news/meldung/73837 for info...
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    That popen is similar to exec is not really new as Heise described themself. It is a good idea to disable it for users, when you users do not use these functions. But ISPConfig uses popen in several scripts so it is a bad idea to disable it in the ispconfig php.ini.
     
  10. davemacd

    davemacd New Member

    I had a similar type of issue where my script (Gallery) was telling me that safe mode was on. I checked the php.ini file and safe mode was definitely set to off.

    I then realised that phpinfo was telling me that local mode was on (ie: safe mode was enabled for the site I was calling the script from) even though the global setting was off.

    After much investigation I found the file;

    /etc/apache2/vhosts/Vhosts_ispconfig.conf

    And sure enough there were entries in there

    php_admin_flag safe_mode On

    I amended this to Off.

    There were two entries, one specific to my site but another which I assume is the default variable. I also switched that off.

    Once restarting apache all is working great.

    Don't know if this is the correct way to resolve it but it works for me !
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    If you disable it this way, safemode is on again when you change anything in ISPConfig.

    The correct solution is really simple, uncheck the PHP safe mode option in settings of this website.
     
  12. davemacd

    davemacd New Member

    AH !!

    I didn't even see that setting in ISPCONFIG !

    So silly - thanks :)
     

Share This Page