eratech
Posts: 513
|
Posted: 07/24/2014, 1:12 AM |
|
Hi - without setting up a demo, a couple of places to check:
- does your webserver have permissions to create folders within the site?
- is there a block on running shell_exec() for the webserver?
- check if the $immo_id is being treated literally "$immo_id" or the variable "12345"
(especially in mkdir("/var/www/vhosts/immos/httpdocs/files/$immo_id", 0755);
- you probably don't need to get '$immo_id = mysql_insert_id();' in both the AfterInsert and AfterProcessFile - try declaring '$immo_db' in the AfterInsert, and then do 'global $immo_db' in the After ProcessFile to pull the variable into scope.
- You may also be able to change the run-time properties for the FileUpload component (for property 'FileFolder' when you have inserted the file and let CCS do the copy/paste for you.
See the example in the Help file that discusses changing the FileFolder per user login.
global $files;
$files->file->FileFolder = "/www/files/" . CCGetUserLogin() . "/";
Cheers
E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia |