I had to use this in order to make it working: sfConfig::set('sf_upload_dir', 'public_html'.DIRECTORY_SEPARATOR.'uploads');
2009/2/17 Tomasz Ignatiuk <tomek.ignat...@gmail.com> > home/domains/myproject/public_html/uploads/scans has 777 > home/domains/myproject/public_html/uploads has 777 > > :( > > 2009/2/17 Alexandru-Emil Lupu <gang.al...@gmail.com> > > >> hi! >> i might believe that is a permission issue... >> run a symfony fix-perms ... task or chmod 777 -R uploads >> >> Alecs >> >> >> On Tue, Feb 17, 2009 at 9:08 PM, Tomasz Ignatiuk < >> tomek.ignat...@gmail.com> wrote: >> >>> >>> Hi >>> >>> I have this situation on my server >>> >>> A have symfony project instaled in: home/domain/mydomain/myproject >>> And web directory in: home/domain/mydomain/public_html >>> >>> In ProjectConfiguration.class.php I set everything like this: >>> public function setup() >>> { >>> $this->enableAllPluginsExcept(array('sfDoctrinePlugin', >>> 'sfCompat10Plugin')); >>> $this->setWebDir('/home/domains/myproject/public_html/'); >>> $this->setCacheDir('/home/domains/mydomain/myproject/cache/'); >>> $this->setRootDir('/home/domains/mydomain/myproject/'); >>> } >>> >>> In API I read that setWebDir sets also sf_upload_dir. >>> >>> public function setWebDir($webDir) >>> sfConfig::add(array( >>> 'sf_web_dir' => $webDir, >>> 'sf_upload_dir' => $webDir.DIRECTORY_SEPARATOR.'uploads', >>> )); >>> } >>> >>> But when I use file field in form like this: >>> $this->setWidgets(array('file' => new sfWidgetFormInputFile())); >>> $this->setValidators(array('file' => new sfValidatorFile(array >>> ('required' => false,'path' => sfConfig::get('sf_upload_dir').'/ >>> scans')))); >>> >>> It uploads files but not to: home/domains/myproject/public_html/ >>> uploads/scans >>> as I expect but to: home/domains/mydomain/myproject/web/uploads/scans' >>> >>> Can You tell me why? >>> >>> >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---