kuttus011 — 2010-05-20T05:29:43-04:00 — #1
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....
raju_gautam — 2010-05-20T06:03:07-04:00 — #2
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.
kuttus011 — 2010-05-20T06:07:44-04:00 — #3
$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..............
raju_gautam — 2010-05-20T10:55:09-04:00 — #4
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.
kuttus011 — 2010-05-20T07:20:49-04:00 — #5
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..
raju_gautam — 2010-05-20T06:58:11-04:00 — #6
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:
kuttus011 — 2010-05-20T09:34:48-04:00 — #7
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
raju_gautam — 2010-05-20T07:58:40-04:00 — #8
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).
kuttus011 — 2010-05-20T07:43:30-04:00 — #9
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.