FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mkdir no such file or directory
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: mkdir no such file or directory [message #181406 is a reply to message #181403] Wed, 15 May 2013 13:51 Go to previous messageGo to previous message
Robert Heller is currently offline  Robert Heller
Messages: 60
Registered: December 2010
Karma:
Member
At Wed, 15 May 2013 12:38:27 +0000 (UTC) Denis McMahon <denismfmcmahon(at)gmail(dot)com> wrote:

>
> On Tue, 14 May 2013 20:06:19 -0700, Bhushan N.N wrote:
>
>> Here is my code again
>>
>> $filelocation = "/uploads/" . "/" . time();
>> if (mkdir($filelocation,0777,true))
>> {
>> echo("Thank you for uploading the file.");
>> }
>> else {
>> echo("Oops error uploading file.");
>> }
>
> Does /uploads exist on your system?
> If /uploads does exist, has the webserver process got sufficient access
> to create subdirs in it?
> If /uploads does not exist, has the webserver process got sufficient
> access to create it?
>
> Given that creating anything at / usually requires root level access, and
> it's generally not recommended to run web servers as root, I suspect
> access rights might be your problem.

And: maybe the OP *really* means something like:

$filelocation = dirname(__FILE__) . "/uploads/" . "/" . time();

That is, he might really want uploads to be *relative* to files on the
website, rather than a absolute place on the server's file system. (The
'dirname(__FILE__)' is just an example, there might be other possibilities.)

>

--
Robert Heller -- 978-544-6933 / heller(at)deepsoft(dot)com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Booleans compared to strings
Next Topic: isset not working with select
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 04:57:24 GMT 2024

Total time taken to generate the page: 0.04839 seconds