I'm trying to upload to /webroot/img/uploads/
both /img and /uploads directory has permission 777
and getting an error: Warning (2): mkdir()
[function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
466]
so I commented out line 466 ~ 476 in folder.php file:
/*
if (mkdir($pathname, $mode)) {
umask($old);
$this->__messages[] = sprintf(__('%s created', true), $pathname);
return true;
} else {
umask($old);
$this->__errors[] = sprintf(__('%s NOT created', true), $pathname);
return false;
}
*/
then everything working ok.

I wander doing this causing any other issue?






On Tue, Aug 11, 2009 at 10:54 AM, brian <[email protected]> wrote:

>
> Don't set the permissions wide open for webroot dir! That's not a good
> idea at all.
>
> What is the full path of the directory you want to upload to?
>
> I'm sorry, I'm not familiar with the plugin and don't understand your
> other question about the data.
>
> On Tue, Aug 11, 2009 at 4:06 AM, leafchild<[email protected]>
> wrote:
> >
> > The uploaded img directory permission is set to 777 and just in case I
> > even changed webroot permission to 777
> > but I'm still seeing  same warning message. Where else I need to
> > check?
> >
> > Also how can I stop update with entire file data to database?
> >
> > after trying to upload file debug show:
> > ==========================================
> > [id] =>1
> > [uploadfile] => Array
> >               (
> >                   [name] => IMG_0801.JPG
> >                   [type] => image/jpeg
> >                   [tmp_name] => /tmp/phpbo9DjW
> >                   [error] => 0
> >                   [size] => 404887
> >               )
> > [desc] =>
> > ...
> > ===========================================
> >
> > uploadfile field needs only file name but looking at sql trying to
> > update
> > filed with file array information.
> >
> >
> >
> >
> >
> >
> > On Aug 7, 6:24 pm, brian <[email protected]> wrote:
> >> Check the permissions for the directory. The webserver has to have
> >> write access to the dir.
> >>
> >>
> >>
> >> On Fri, Aug 7, 2009 at 4:02 PM,leafchild<[email protected]>
> wrote:
> >>
> >> > I'm trying to make this plugin(http://www.milesj.me/resources/script/
> >> > uploader-plugin) works.
> >>
> >> > However, after I install I'm getting an error - Warning (2): mkdir()
> >> > [function.mkdir]: Permission denied [CORE/cake/libs/folder.php, line
> >> > 466]
> >> > Actually I tried another behavior to upload file and got same error.
> >> > Do  I need to do some kind of server setting? I'm using MT(dv)
> >>
> >> > Also after submit to upload file I'm getting an SQL error because data
> >> > need to be one but it try to update entire file data:
> >>
> >> > ==========================================
> >> > [id] =>1
> >> > [uploadfile] => Array
> >> >               (
> >> >                   [name] => IMG_0801.JPG
> >> >                   [type] => image/jpeg
> >> >                   [tmp_name] => /tmp/phpbo9DjW
> >> >                   [error] => 0
> >> >                   [size] => 404887
> >> >               )
> >> > [desc] =>
> >> > ...
> >> > ===========================================
> >> > "uplodefile" 's data is not array just [NAME] of file.
> >>
> >> > How can I stop doing it? I can't use "$this->Landing->save($this-
> >> >>data)" if I have file uploading?
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to