Hello friends for me in the local host the mkdir is working perfectly its making the folders and uploading my images
but in the server its giving error like below please help me to solve it so what i can complete my project pls any one....
Warning: mkdir() [function.mkdir]: Unable to access /var/www/vhosts/silver.com/httpdocs/jeeva/images/given/20-05-2010 in /var/www/vhosts/silver.com/httpdocs/jeeva/imageview.php on line 153
Cannot create upload directory.
please reply a solution as soon as possible....
I doubt that there is permission issue. It seems the folder in which you are going to create a folder does not have enough permission. Show us the code.
$Directory = "/var/www/vhosts/silver.com/httpdocs/jeeva/images/".$COOKIE['IDmy_site']."/".date("d-m-Y");
mkdir("/var/www/vhosts/silver.com/httpdocs/jeeva/images/".$COOKIE['IDmy_site']."/".date("d-m-Y"),0777) or die('Cannot create upload directory.');
hello friend this is my code and no folders are creating up for me in the server....why i dont know..
give me a solution..............
Comon dude, I already pointed you that you have permission problem and you have to give the permission to that folder. If you have already created folder then you give permission from FTP software manually. But if you create them from PHP script then you have to give permission from script itself and you have to use chmod() function in PHP. But as per your previous error message for this, the function has been disabled by your server, so ask your webhost to enable it.
hello friend here i need to create 3 folders like image,$COOKIE['IDmy_site'],date("d-m-Y") so what should i do
and how to apply seperate chomd for each folder..
Is the folder for named with $COOKIE['IDmy_site'] already created or you want to create it too? So if you want to create a folder inside that then you need to give permission for that.
See the chmod function in manual:
hello friend i am getting an error as follows i dont know wht to do while google also not getting a solution if you can pls its working fine in localhost....
Warning: mkdir() [function.mkdir]: Permission denied
Hey man, try to google or even in this forum before you ask everything here. Your server/webhost has disabled the function chmod so you cannot run this function in your script. So contact your server host to enable that function (remove the chmod function from disabled_functions).
hello friend i given chmod code as below the also no use its not creating...
$Directory = $path."/".$path1."/".$path2;
and giving the following errors
Warning: chmod() [function.chmod]: Operation not permitted in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 150
Warning: chmod() [function.chmod]: Unable to access given in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 151
Warning: chmod() [function.chmod]: stat failed for given in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 151
Warning: chmod() [function.chmod]: Unable to access 20-05-2010 in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 152
Warning: chmod() [function.chmod]: stat failed for 20-05-2010 in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 152
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/alboom.com/httpdocs:/tmp) in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 154
Warning: mkdir() [function.mkdir]: SAFE MODE Restriction in effect. The script whose uid is 10020 is not allowed to access // owned by uid 0 in /var/www/vhosts/alboom.com/httpdocs/newspaper/imageview.php on line 156
Cannot create upload directory.