hi
i am new linux user. i have a code to make directory like this
<?php
$dept="cse";
$user_name="agile"
mkdir("c:/xampp/htdocs/$dept/$user_name/profile", 0777, true);
chmod("c:/xampp/htdocs/$dept/$user_name/profile", 0777);
?>
it is work in windows. bt in linux it is not working. it gives error like access denied to mkdir
pls. help me regarding this
agile
access denied in mkdir function
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: access denied in mkdir function
I'm pretty sure there is no c:/xampp/htdocs/$dept/$user_name directory on your Linux machine.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: access denied in mkdir function
sry i have tried like this
<?php
$dept="cse";
$user_name="agile"
mkdir("/$dept/$user_name/profile", 0777, true);
chmod("/$dept/$user_name/profile", 0777);
?>
it does not work in linux...
<?php
$dept="cse";
$user_name="agile"
mkdir("/$dept/$user_name/profile", 0777, true);
chmod("/$dept/$user_name/profile", 0777);
?>
it does not work in linux...
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: access denied in mkdir function
So the user that your webserver is running as does not have write permissions to the /$dept/$user_name/profile directory. You will have to change the permissions via shell, FTP or your web hosting control panel.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.