Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install ajaxplorer at a shared hosting in my home folder. When I navigate to the main page, I get an error:

is_writable(): open_basedir restriction in effect. 
    File(/var/lib/php5) is not within the allowed path(s): 
    (/var/www//username/:/usr/sbin/sendmail:/usr/share/php
        :/home/www/appname::/usr/share/pear:/dev/urandom)

What might be the cause? How could I fix it?

There is php 5.3.3 installed, apache 2.2.16. I use ajaxplorer 4.0.4.

EDIT:

The problem is caused by this code part:

$tmpDir = session_save_path();
$this->testedParams["Session Save Path"] = $tmpDir;
if($tmpDir != ""){
   $this->testedParams["Session Save Path Writeable"] = is_writable($tmpDir);

Error appears in the last line, but I enclosed the context.

share|improve this question
    
What script/line generated the error? Can you paste the relevant snippets? –  Jay Jun 9 '12 at 23:43
    
Open basedir is a PHP security configuration parameter. Ask you hosting provider to change it, install in a location include in the open_basedir allowed paths. I assume 'other-path' points to your vhost dir? –  Halfgaar Jun 10 '12 at 6:10
    
@Jay Shah: I don't know, where exactly the problem ocures I'm just trying to install a downloaded application. –  mrzasa Jun 12 '12 at 21:53
    
@Halfgaar: I added other paths. Provider won't change paths (btw. adding there /var/php5 seems to be not the best idea). I cannot install it in any other place. –  mrzasa Jun 12 '12 at 21:55
    
@Halfgaar: I added code snippet what cause the error. –  mrzasa Jun 12 '12 at 22:19

1 Answer 1

up vote 1 down vote accepted

Can you try adding this to the top of the file:

session_save_path('/tmp');

If that works, you'll need to put it in a file that will be included by all other files for good measure (such as a configuration one where you specify your database details).

Alternatively, you can try adding a .htaccess flag or custom PHP.ini (former if you are using suPHP, latter if you are not). But let's try this first and see what happens.

AUTHOR'S EDIT:

Finally I had to put:

session_save_path(AJXP_INSTALL_PATH."/tmp"); 
define("AJXP_TMP_DIR", AJXP_INSTALL_PATH."/tmp"); 

in the conf/bootstrap_context.php file and it helped.

share|improve this answer
    
Finally I had to put: session_save_path(AJXP_INSTALL_PATH."/tmp"); define("AJXP_TMP_DIR", PATH_TO_AJAXP_INSTALL."/tmp"); in the conf/bootstrap_context.php file. Still this answer was helpful, so I', accepting it. Thanks! –  mrzasa Jun 13 '12 at 19:32
    
tha second line was of course: define("AJXP_TMP_DIR", AJXP_INSTALL_PATH."/tmp"); –  mrzasa Jun 13 '12 at 21:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.