Jump to content

mkdir, no such file?


Jessica

Recommended Posts

<?php
print $moveTo;
if(!is_dir($moveTo)){
   if(!mkdir($moveTo)){  // 153
      return false;
   }
}?>

 

I get:

/home/mysite/folder/

Warning: mkdir() [function.mkdir]: No such file or directory in /home/mysite/functions.php on line 153

 

When it's

/home/mysite/folder it still doesn't work.

 

Ideas?

Link to comment
Share on other sites

777 is default. I can't create the folder, so how can I CHMOD it?

 

Actually, this is weirder - the folder already exists, so it shouldn't be trying to mkdir it - it's like it can't see $moveTo in the is_dir and mkdir commands...but I can print it out right before.

Link to comment
Share on other sites

777 is default. I can't create the folder, so how can I CHMOD it?

 

Actually, this is weirder - the folder already exists, so it shouldn't be trying to mkdir it - it's like it can't see $moveTo in the is_dir and mkdir commands...but I can print it out right before.

I'm sorry, I'm not very PHP-logic.. Maybe someone else can help?

Sorry.. :(

Link to comment
Share on other sites

If it was a permissions issue, wouldn't I get a permissions error? Instead it's acting like the folder doesn't exist when it does. All the folders are 777.

 

Well it didn't like me using the whole path...if I just do 'folder' it works, but not '/home/mysite/folder';

Link to comment
Share on other sites

To me, that indicates that it will be the current path + that, so if just "folder" creates a folder at /home/mysite/folder/, won't that make "/home/mysite/home/mysite/folder/" ?

 

Is this some kind of ini setting or something? I just recently changed the site from php4 to php5 also...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.