Jump to content
xisto Community
Sign in to follow this  
signatureimage

Help Needed- Php Mkdir() PHP mkdir() - Permission denied

Recommended Posts

My PHP script, running on Xisto.com,calls the PHP function mkdir() to create a new directory.This works on my home development-server on Microsoft Windows with Apache.This works on my home test-server on Linux Fedora with Apache.This does NOT work on Xisto.com: "Permission denied".According to the CPanel File Manager, the properties ofthe parent directory are: permissions 755:User: Read-Write-ExecuteGroup: Read-ExecuteWorld: Read-ExecuteAny idea, administrators?

Share this post


Link to post
Share on other sites

it seems to be a CHMOD issue, is the parent directory the default (public_html) or one that you have made. you could always try setting the default dir to 777. or this could be a temporary problem as a result of the down time to Xisto, as some of us did have problems logging in cpanel and the like.what is the code you are using?although it does seem most likely an issue with the CHMOD settings although 755 should allow creating of folders shouldn't it?lets see what the mods or admins say. they are smarter than me lol.

Share this post


Link to post
Share on other sites

Dear overture,

 

You asked for the code:

//---------------------------------------------------------------------------------------------------------------------------------------------------// Called by F_Create_Folder()function F_Make_Folder($P_foldername)	{	if (file_exists('../'.$P_foldername))  {  return "OK";  }	else  {  if ($rc = mkdir('../'.$P_foldername)) 	 { 	 return "OK"; 	 }  else 	 { 	 return "KO"; 	 }  }		}//---------------------------------------------------------------------------------------------------------------------------------------------------

 

Note: the if ($rc = mkdir('../'.$P_foldername)) is not a comparison, it is an assignment, whose boolean value is tested.

Therefore, only one equal sign is used...

 

 

 

Dear overture,

 

Your suggestion to modify the permissions to 777 will temporarily be tried.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.