I'm using PHP to produce a directory. Following the directory is produced it's given a chmod of 777. Then i possess a simple script for any user to upload personal files towards the directory. The problem that i'm getting would be that the directory won't complete the file transfer after i run the script. BUT... basically by hand use via FTP and make up a new directory and assign 777 towards the produced folder then your script works fine and also the file is moved. Can there be some set-track of my hosting company that's restricting this ability? Or perhaps is it within the PHP script? This is actually the code in which I produce the new directory:

<?php

$thisdir = getcwd()

$new_dir = 'test'

$full_dir = $thisdir . "/" . $new_dir

function chk_dir($full_dir)  else 



chk_dir($full_dir)

chmod($full_dir, 0777)

?>

I understand there has to be an easy reason behind this, appreciate looking at my problem.

See if Safe_mode is switch on in your server.

mkdir() produces folder as owner, it isn't the script owner, therefore the scripts could not upload the file into that folder. While safe_mode is switched on chmod() dosen't work. Doc: http://php.internet/manual/en/features.safe-mode.php

try adding this line at the outset of the php script to check on for alerts:

ini_set('display_errors', '1')