Thursday, February 3, 2011

php include file

I have a common framework that resides in /var/www/fw/trunk path, and also have a virtual host that resides in /var/www/vhosts/aerosoftware.net/httpdocs/ on a http://aerosoftware.net/ domain.

I changed php.ini include path to include_path='.:/var/www/fw/trunk' but still I get an include error. Why is that?

  • /var/www/vhosts/aerosoftware.net/httpdocs/ looks like the standard layout of a Plesk box. Try creating a .htaccess file inside your httpdocs directory with the following in it.

    php_value include_path ".:/var/www/fw/trunk"
    

    I'd also recommend creating a phpinfo.php file with

    <? phpinfo(); ?>
    

    in it so that you can check that the include_path value has been changed.

    dfilkovi : You can check http://aerosoftware.net/ that will show you an error and also will show you that it has right include path (include_path='.:/var/www/fw/trunk'), but you are right, it's a plesk box.
    dfilkovi : Also here is the phpinfo path so you can view it: http://aerosoftware.net/phpinfo.php
    From rodjek
  • Be aware, that there may be two or more php.ini files. For example, on my OpenSuse machine there is two of them, one for apache environment, and one generic.

  • I found a solution, it was this thing I had to put in a config file for that virutal host:

    php_admin_value safe_mode off

    php_admin_value open_basedir none

    From dfilkovi

0 comments:

Post a Comment