open_basedir restriction does not allow me to use rename() or write files in a dir.

Posted by lukasoppermann on Stack Overflow See other posts from Stack Overflow or by lukasoppermann
Published on 2010-03-15T23:25:33Z Indexed on 2010/03/15 23:29 UTC
Read the original article Hit count: 171

Filed under:
|

Hey,

I have a php file (currently at / ) and I want this file to change the content of a file, "test.js". This file is in the dir "/libs/js/test.js". While I can read the content, for example with fread or file_get_contents, I can not write in it with file_put_contents or any other function. I always get the Warning

Warning: rename() [function.rename]: open_basedir restriction in effect. File(/libs/js/test.js) is not within the allowed path(s): (/var/www/web166/:/usr/bin/) in /var/www/web166/html/info.php on line 88

Does anyone have any idea what to do? Thanks in advance.

© Stack Overflow or respective owner

Related posts about php

Related posts about open-basedir