Author Topic: problem uploading and saving docs via opengoo  (Read 3354 times)

weboffice

  • Newbie
  • *
  • Posts: 30
    • View Profile
problem uploading and saving docs via opengoo
« on: May 09, 2009, 06:33:43 am »
Quote
Hi every body,

I have the following problem when i want safe an document online or upload an document.

the error log says:
Quote
#1 ERROR: Error: copy() [<a href='function.copy'>function.copy</a>]: SAFE MODE Restriction in effect.  The script whose uid is 1066 is not allowed to access /home/smit/domains/officeunit.nl/public_html/og/upload/ebda6/0305a/326ef owned by uid 1000 in '/home/smit/domains/officeunit.nl/public_html/og/library/filerepository/backend/FileRepository_Backend_FileSystem.class.php' on line 171 (error code: 2)
#2 ERROR: Error: copy(/home/smit/domains/officeunit.nl/public_html/og/upload/ebda6/0305a/326ef/a3d77ba737d416b84c104a90b) [<a href='function.copy'>function.copy</a>]: failed to open stream: No such file or directory in '/home/smit/domains/officeunit.nl/public_html/og/library/filerepository/backend/FileRepository_Backend_FileSystem.class.php' on line 171 (error code: 2)

And my php.info says:
Quote
PHP Version 5.2.8

System    Linux server.correcthosting01.nl 2.6.18.xs4.1.0.1168.6013 #2 SMP Fri Mar 21 19:28:22 UTC 2008 i686
Build Date    Jan 23 2009 10:48:12
Configure Command    './configure' '--with-apxs2' '--with-curl=/usr/local/lib' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-kerberos' '--enable-sqlite-utf8' '--with-imap' '--with-xsl=/usr/local/directadmin/custombuild/libxslt-1.1.23/' '--with-imap-ssl' '--with-openssl' '--with-mcrypt' '--with-pdo-mysql=/usr/local/mysql' '--with-mhash' '--with-mysql=/usr/local/mysql' '--with-mysqli=/usr/local/mysql/bin/mysql_config' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-mbstring'
Server API    Apache 2.0 Handler
Virtual Directory Support    disabled
Configuration File (php.ini) Path    /usr/local/lib
Loaded Configuration File    /usr/local/lib/php.ini
Scan this dir for additional .ini files    (none)
additional .ini files parsed    (none)
PHP API    20041225
PHP Extension    20060613
Zend Extension    220060519
Debug Build    no
Thread Safety    disabled
Zend Memory Manager    enabled
IPv6 Support    enabled
Registered PHP Streams    zip, php, file, data, http, ftp, compress.zlib, https, ftps
Registered Stream Socket Transports    tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters    string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

and safe mode is ....

Quote
register_argc_argv   On   On
register_globals   Off   Off
register_long_arrays   On   On
report_memleaks   On   On
report_zend_debug   On   On
safe_mode   Off   Off
safe_mode_exec_dir   no value   no value
safe_mode_gid   Off   Off
safe_mode_include_dir   no value   no value
sendmail_from   no value   no value


... off!

So what should i do next? Please help...

greetings from holland!

alex

daniel_hug

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: problem uploading and saving docs via opengoo
« Reply #1 on: June 09, 2009, 05:41:07 pm »
Hi alex,
i have a similar porblem on my site.
did you find a solution?

regards daniel

Update: log.php output:
Session "default" started at 2009-06-09T20:23:05+0000
#1 ERROR: Error: copy() [<a href='function.copy'>function.copy</a>]: open_
basedir restriction in effect. File(/var/tmp/phpPnY09z) is not within the
allowed path(s): (/var/www) in '/var/www/sirius/opengoo/application/contro
llers/FilesController.class.php' on line 414 (error code: 2)
Time since start: 0.543842077255 seconds

and SAFEMODE = Off
« Last Edit: June 09, 2009, 05:53:19 pm by daniel_hug »

daniel_hug

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: problem uploading and saving docs via opengoo
« Reply #2 on: June 09, 2009, 06:05:09 pm »
OK, some research helped.

The Problem originates from the php.ini file.


open_basedir
Limit the files that can be opened by PHP to the specified directory-tree, including the file itself. This directive is NOT affected by whether Safe Mode is turned On or Off.

Upload path was set to /tmp
basedir to: /var/www
this way, php is limited by basedir and can not access anything outside /var/www (no access to /tmp)

solution: create a tmp directory in /var/www and change the uploadpath in php.ini to /var/www/tmp

works fine for me now.
Hope this helps.

regards
daniel

weboffice

  • Newbie
  • *
  • Posts: 30
    • View Profile
Re: problem uploading and saving docs via opengoo
« Reply #3 on: June 10, 2009, 07:19:32 am »
Dear reader,

I have contacted my hostingprovider and he solved the problem by turning the save mode off...
Right now i have no problems any more

Sorry for the late reply!

bye,

Alex