[Resolved] LiteSpeed Path Issue

Discussion in 'Apache Migration/Compatibility' started by UWH-David, Aug 23, 2010.

  1. UWH-David

    UWH-David New Member

    Having an issue with RVSitebuilder. It appears the script wants to pull from the path which LiteSpeed does not have configured.

    [STDERR] PHP Warning: is_file() [<a href='function.is-file'>function.is-file</a>]: open_basedir restriction in effect. File(/usr/local/lsws/lsphp5/lib/php/RVSeagullMod/lib/SGL/FrontController.php) is not within the allowed path(s): (/home/philipss:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp) in /home/philipss/public_html/new/rvscommonfunc.php on line 50


    FrontController.php is located @ /usr/local/lib/php/RVSeagullMod/lib/SGL/FrontController.php

    So the question is how do I append to the path to meet the requirements of this or change where the default path is searched?
    Last edited by a moderator: Aug 24, 2010
  2. NiteWave

    NiteWave Administrator

    as the warning message suggested,

    FrontController.php is located at /usr/local/lsws/lsphp5/lib/php/RVSeagullMod/lib/SGL/

    so you need add
    /usr/local/lsws/lsphp5/lib/php/RVSeagullMod/lib/SGL/
    or (should be better)
    /usr/local/lsws/lsphp5/lib/php/
    to your open_basedir (search php.ini)
  3. UWH-David

    UWH-David New Member

    That is not the proper path though as explained clearly. The proper path is :

    /usr/local/lib/php/RVSeagullMod/lib/SGL/FrontController.php
  4. NiteWave

    NiteWave Administrator

    what's the include_path value in phpinfo() output?
  5. UWH-David

    UWH-David New Member

    include_path .:/usr/local/lsws/lsphp5/lib/php .:/usr/local/lsws/lsphp5/lib/php

  6. NiteWave

    NiteWave Administrator

    so I think the issue is almost clear: the order of include paths.

    when
    PHP:
    include "RVSeagullMod/lib/SGL/FrontController.php"
    it searches FrontController.php in order of include_path

    you wish it get
    /usr/local/lib/php/RVSeagullMod/lib/SGL/FrontController.php
    instead of
    /usr/local/lsws/lsphp5/lib/php/RVSeagullMod/lib/SGL/FrontController.php

    then try to change include_path in php.ini to
    .:/usr/local/lib/php:/usr/local/lsws/lsphp5/lib/php
    etc
  7. UWH-David

    UWH-David New Member

    No Include path is defined @ /usr/local/lsws/lsphp5/lib/php.ini which IS the php.ini file used.

    Where else would it be pulling from?

  8. UWH-David

    UWH-David New Member

  9. NiteWave

    NiteWave Administrator

    made 2 changes, the cPanel plugin RVSitebuilder working now:
  10. ffeingol

    ffeingol Member

    Not to get too OT here, but if you hand edited the httpd.conf file you are just waiting for a disaster. The next time cPanel rebuilds httpd.conf those chages will get wiped out.
  11. NiteWave

    NiteWave Administrator

    Thanks for the advice.

    not sure where following section in httpd.conf
    came from, should it be defined in which part of cPanel?

    this value is picked by lsws and results in the final phpinfo() page.
  12. ffeingol

    ffeingol Member

    Those come from a template that cPanel uses to built the virtual host. I'd look at the documentation on virtualhost includes (http://docs.cpanel.net/twiki/bin/view/EasyApache3/InsideVHost#Using_Include_Files) You can create a configuration file that will only be picked up by that one domain. It adds the include at the very bottom of the virtualhost container. If I understand LSWS correct it will pick up the last version of the directive (i.e. if there are multiple open_basedir) so the includes 'should' work perfect with LSWS.
  13. NiteWave

    NiteWave Administrator

    yes, /userdata/ is for specific vhost. I saw the directive(php_admin_value ) exist s in every vhost definition. and yes, this is the last version of php_admin_value definition within the vhost.
  14. UWH-David

    UWH-David New Member

    Very true. Why is it using the php4 variables anyhow?



  15. NiteWave

    NiteWave Administrator

    I think "/usr/lib/php:/usr/local/lib/php" is for php5, and "/usr/php4/lib/php:/usr/local/php4/lib/php" for php4. so it includes both php4 and php5.
  16. UWH-David

    UWH-David New Member

    And why would it be using PHP4 when it is disabled in LiteSpeed?

  17. NiteWave

    NiteWave Administrator

    is not set by litespeed. it's set by user or app like RVSitebuilder. lsws just inherit user's setting. the user may set "/usr/php3/lib" at his will, lsws can't guess its php3 and don't inherit it.
  18. UWH-David

    UWH-David New Member

    There is a PHP4 and a PHP5 section set by cPanel for Apache. LiteSpeed should be picking up the PHP5 section.

Share This Page