Login or Register

RSS IconRecent posts in this topic

avatar
interactive on Feb 1. 2007. 3:56 am
Hello,
I know, it has been reported and I read a lot of "solutions".
I even tried to change the code in the file /environment/functions/files.php of the function "force_mkdir" and I'm not allowed to change any variable on mysql.

It fails to upload any file of any size. My post_max_size php variable is 10 M.
I use the file storage instead of mysql storage because I cannot increase the size of the desired variable in my.cnf

Does anyone have a working solution of modification of this function to make it write in a allowed folder ?

I think the problem comes from there, in the server, the variable "open_basedir" is set as :

/home/awstats/data:/usr/local/lib/php:/usr/X11R6/lib/X11/fonts/truetype:/usr/local/bin:/home/www for local value and

/home/awstats/data:/usr/local/lib/php:/usr/X11R6/lib/X11/fonts/truetype:/usr/local/bin:/home/www for master value.

In the log.php, I can read this (before modifying ) :

Session "default" started at 2007-01-31T18:38:28+0000
#1 ERROR: Error: is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect.
File(/) is not within the allowed path(s):
(/home/awstats/data:/usr/local/lib/php:/usr/X11R6/lib/X11/fonts/truetype:/usr/local/bin:/home/www) in
'/home/www/client/www/activecollab/environment/functions/files.php' on line 241 (error code: 2)
#2 ERROR: Error: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: open_basedir restriction in effect.
File(/) is not within the allowed path(s):
(/home/awstats/data:/usr/local/lib/php:/usr/X11R6/lib/X11/fonts/truetype:/usr/local/bin:/home/www) in
'/home/www/client/www/activecollab/environment/functions/files.php' on line 243 (error code: 2)


and , after modifying :

Session "default" started at 2007-02-01T09:43:21+0000

#1 ERROR: Error: copy(/home/www/client/www/activecollab/upload/f052e/f68e1/9d911/57c53bbbbf79357e4713eb6b4) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in '/home/www/client/www/activecollab/library/filerepository/backend/FileRepository_Backend_FileSystem.class.php' on line 170 (error code: 2)

Time since start: 0.43748497962952 seconds


Does anyone have a solution, please ? I'm really in need.


My config :
I paid for a server (linux platform) and I can ask for changes only on php.

Thanks for helping
avatar
Ilija Studen on Feb 1. 2007. 5:33 am
The problem in this case is open_basedir restriction (force_mkdir starts checking from the root path, not from the installation path). Check out this page:

http://www.php.net/manual/en/features.safe-mode.php#ini.open-basedir

Other solution would be to hack force_mkdir function to start checking from installation path.
activeCollab team member | LinkedIn
avatar
interactive on Feb 1. 2007. 7:00 am
Thanks for replying Ilija,

Other solution would be to hack force_mkdir function to start checking from installation path.


Do you mean the work around used by someone here in the forum ? The add of a $dr = $_SERVER['DOCUMENT_ROOT']; ?

I tried this and it doesn't work for me.

I asked the technical service to add the path "/home/www/client/www/activecollab/upload/" to the variable open_basedir.

Don't know if it will solve the problem.
At the end, I will force them to put it off but it's dangerous.
avatar
interactive on Feb 5. 2007. 11:46 am
My "ISP" accepted to put off the open_basedir variable and now, I'm able to up files !
Thanks for the help.

One more thing, I have a problem of file page viewing when I up images.
I'll get it with the search feature.

Cheers
Madani
avatar
Pallieter on Aug 29. 2007. 2:46 pm
If I don't select a folder in the "upload file" form than $forced_path is "/". This is in violation of the open basedir configuration. The full file system path should be prepended to the variable.
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.

RSS IconRecent posts in this topic