Quote from: Metaller at Sep 19, 2008, 01:58 AM
There is a bug with FTP commands in this version of DR. I’ll fix it later.
Hi Metaller,
I got the FTP to work for me, by modifying directResize.php - here is what i did...
I changed line 670
From:
$changeDir = ftp_chdir($connect, $this->drconfig['ftp_base_dir'].$path_to_gal);
To:
$changeDir = ftp_chdir($connect, $this->drconfig['ftp_base_dir'].DIRECTRESIZE_GALLERYDIR);
I changed line 672
From:
$output = 'Could not change directory to: '.$this->drconfig['ftp_base_dir'].$path_to_gal;
To:
$output = 'Could not change directory to: '.$this->drconfig['ftp_base_dir'].DIRECTRESIZE_GALLERYDIR;
I changed line 681
From:
$setPerm = ftp_site($connect, 'CHMOD 0777 /'.$path_to_gal);
To:
$setPerm = ftp_site($connect, 'CHMOD 0777 /'.$this->drconfig['ftp_base_dir'].$path_to_gal);
For anyone else who has to use php with safe mode on, this worked for me, with the above modifications to the code in DirectResize 0.8.0.2.
Of course I also had to create my own config file as outlined in the readme file with settings like the following included:
$use_ftp_commands = 1;
$ftp_server = ’yourhost.com.au’;
$ftp_user = ’yourusername’;
$ftp_pass = ’yourpassword’;
$ftp_base_dir = ’/path/to/modx/’;