Koozali.org: home of the SME Server

Silverstripe CMS

Offline Bud

  • *
  • 487
  • +0/-0
Silverstripe CMS
« 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  :-)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Silverstripe CMS
« Reply #1 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 :-)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Silverstripe CMS
« Reply #2 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
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Silverstripe CMS
« Reply #3 on: July 19, 2011, 06:42:00 PM »
indeed cactus but I answered from my phone while driving :-)

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Silverstripe CMS
« Reply #4 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 ;-)
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Bud

  • *
  • 487
  • +0/-0
Re: Silverstripe CMS
« Reply #5 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 :)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Silverstripe CMS
« Reply #6 on: August 04, 2011, 02:32:45 PM »
bud, please re-read the error message.. the answer to your question is there :-)

hint: /tmp

Offline Bud

  • *
  • 487
  • +0/-0
Re: Silverstripe CMS
« Reply #7 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

Offline larieu

  • *****
  • 214
  • +0/-0
Re: Silverstripe CMS
« Reply #8 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
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline Bud

  • *
  • 487
  • +0/-0
Re: Silverstripe CMS
« Reply #9 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.  :?
« Last Edit: August 05, 2011, 09:59:57 AM by Bud »

Offline larieu

  • *****
  • 214
  • +0/-0
Re: Silverstripe CMS
« Reply #10 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
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline Bud

  • *
  • 487
  • +0/-0
Re: Silverstripe CMS
« Reply #11 on: August 08, 2011, 01:46:33 PM »
larieu thanks for your support

did what you recommended

same problem, cannot upload any files  :(

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Silverstripe CMS
« Reply #12 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




Offline Bud

  • *
  • 487
  • +0/-0
Re: Silverstripe CMS
« Reply #13 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