Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: Bud on July 19, 2011, 02:42:31 PM

Title: Silverstripe CMS
Post by: Bud on July 19, 2011, 02:42:31 PM
guys hope you can help

installed silverstripe in /opt/silverstripe
everything works except for document " upload "
cannot upload any documents
i made sure about folder rights etc.

when i look at the sme 8 server logs this is what it says

=====================

PHP Warning: Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/opt/silverstripe) in Unknown on line 0
pHP Warning: File upload error - unable to create a temporary file in Unknown on line 0

=====================

i seem to have a " open_basedir " problem

any help greatly appreciated  :-)
Title: Re: Silverstripe CMS
Post by: Stefano on July 19, 2011, 03:27:12 PM
you could start searching the forums, wiki and FAQ, for example..

your question has been asked maaaaany times :-)
Title: Re: Silverstripe CMS
Post by: cactus on July 19, 2011, 06:10:50 PM
you could start searching the forums, wiki and FAQ, for example..
Yes, but we can also point OP to the proper page directly. :-D

http://wiki.contribs.org/PHP#Open_basedir_restriction
Title: Re: Silverstripe CMS
Post by: Stefano on July 19, 2011, 06:42:00 PM
indeed cactus but I answered from my phone while driving :-)
Title: Re: Silverstripe CMS
Post by: cactus on July 19, 2011, 09:59:22 PM
indeed cactus but I answered from my phone while driving :-)
Ooh naughty naughty, that is not allowed where I live ;-)
Title: Re: Silverstripe CMS
Post by: Bud on August 04, 2011, 02:29:01 PM
thanks for trying to help guys

this is what i did
#db accounts getprop ibayname PHPBaseDir
Nothing Happened

Then i issued
#db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/silverstripe
#signal-event ibay-modify silverstripe

Restarted SME Server
Tried to Upload a File. CANNOT UPLOAD FILE
Looked at Logs and same problem

===================================
Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/opt/silverstripe) in Unknown on line 0
File upload error - unable to create a temporary file in Unknown on line 0
===================================

Please Guys I need to get this working
Any Help Greatly Appreciated :)
Title: Re: Silverstripe CMS
Post by: Stefano on August 04, 2011, 02:32:45 PM
bud, please re-read the error message.. the answer to your question is there :-)

hint: /tmp
Title: Re: Silverstripe CMS
Post by: Bud on August 05, 2011, 06:43:12 AM
Stefano thanks for your support

so are you saying i should issue the command like this:

#db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/silverstripe/tmp
#signal-event ibay-modify silverstripe/tmp

or what ?? 

sorry for the noob question. i understand that the " tmp " is the problem but i am not sure what command to issue

thanks again  :D
Title: Re: Silverstripe CMS
Post by: larieu on August 05, 2011, 09:24:10 AM
please verify in settings of Silverstripe where is tmp set
I suppose it is not good to use the system /tmp

look if you have one tmp in /opt/silverstripe
if not you should create give adequate rights/ownership and find adequate silverstripe setings to make adjustments to point on it
Title: Re: Silverstripe CMS
Post by: Bud on August 05, 2011, 09:53:10 AM
larieu thanks for your help

you asked: please verify in settings of Silverstripe where is tmp set

i have checked and rechecked that the tmp foler is in /opt/silverstripe/tmp and has FULL Rights

what i am trying to understand is what my server log file says

what does this mean? what tmp file and where? the server tmp file, the silverstripe tmp file or what?
===================================
Unknown: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/opt/silverstripe) in Unknown on line 0
File upload error - unable to create a temporary file in Unknown on line 0
===================================

not sure what else to look for.  :?
Title: Re: Silverstripe CMS
Post by: larieu on August 06, 2011, 06:21:00 AM
to rule out the /tmp path try doing like this


Code: [Select]
db accounts setprop Primary PHPBaseDir /home/e-smith/files/ibays/Primary/html/:/opt/silverstripe/:/opt/silverstripe/tmp/:/tmp

signal-event ibay-modify silverstripe

or to be more sure
Code: [Select]
signal-event post-upgrade; signal-event reboot
Title: Re: Silverstripe CMS
Post by: Bud on August 08, 2011, 01:46:33 PM
larieu thanks for your support

did what you recommended

same problem, cannot upload any files  :(
Title: Re: Silverstripe CMS
Post by: mmccarn on August 09, 2011, 12:04:52 PM
you mentioned that you installed silverstripe in /opt/silverstripe.

How did you create the httpd.conf entries for the new app?

On my systems, apps installed in /opt (as opposed to apps installed in ibays) require me to make modifications to custom template fragments -- usually in /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf (instead of using db commands)

Take a look in /etc/e-smith/templates-custom/httpd/conf/httpd.conf - if you find a custom template fragment that looks like it's related to silverstripe, add a line inside the <Directory>....</Directory> segment that says:

php_admin_value  open_basedir  /tmp



Title: Re: Silverstripe CMS
Post by: Bud on August 10, 2011, 09:30:22 AM
mmccarn thanks so much for POINTING me in the RIGHT DIRECTION

woohoo i got it sorted. it's working

i will make a how to showing what i did including the Solution for Feng Office Document Uploads

thanks again for your help, much appreciated

will compile my findings and get back to the sme team asap

long live sme server  :D