Forum

PHP FTP Synchronizer errors and question

2011-05-30 04:55:44

fetto

Hello, First a question? How do i set sourcefolder to the parent relative to where the scripts are placed? ive tried ..\\test ../test ..\test /test \\test Without success. Im running XAMPP on windows. Also, i get these errors when running a sync. Strict Standards: Non-static method Path::merge() should not be called staticall y in C:\xampp\htdocs\filesync\ftpsync.php on line 367 Same on line 462. Thanks for a great script! Between, would it be possible to include FAM for your script? "fam_monitor_directory — Monitor a directory for changes" php.net/manual/en/function.fam-monitor-directory.php Thanks again! Kindest Regards, Mikael.
2011-05-30 07:02:02

scriptol

Hello, You do not need for XAMPP to run the script. You must enter the directory of the script, usually /ftp and run it inside the directory. PHP must be installed and available anywhere. Under Windows, the path variable must be set to add the PHP directory. For exemple:
set PATH=%PATH%;c:\PHP\
This could be set automatically by the installer. Let me know if it works in the way or if you get error messages. For FAM, it is not part of the standard build, so I can not add it to the script that must run on any configuration. It must be added by the user.
2011-05-30 08:08:21

fetto

Thank you for your reply! It's the source folder to sync that im talking about. For example: php ftpsync.php -v test This would sync the folder test, that is in C:\xampp\htdocs\filesync\test But i need to sync the folder that's in C:\xampp\htdocs\test How would i write the command to point to that parent folder instead? PHP is in path and working properly, files are synced but i still get the error message, here is complete output: C:\xampp\htdocs\file-sync>php ftpsync.php -v test Verbose mode enabled Source directory: test Remote directory: Connected on localhost as ftp_user111 Passive mode turned on Synchronizing test on localhost PHP Strict Standards: Non-static method Path::merge() should not be called stat ically in C:\xampp\htdocs\file-sync\ftpsync.php on line 367 Strict Standards: Non-static method Path::merge() should not be called staticall y in C:\xampp\htdocs\file-sync\ftpsync.php on line 367 Processing test/test.txt PHP Strict Standards: Non-static method Path::merge() should not be called stat ically in C:\xampp\htdocs\file-sync\ftpsync.php on line 376 Strict Standards: Non-static method Path::merge() should not be called staticall y in C:\xampp\htdocs\file-sync\ftpsync.php on line 376 PHP Strict Standards: Non-static method Path::merge() should not be called stat ically in C:\xampp\htdocs\file-sync\ftpsync.php on line 462 Strict Standards: Non-static method Path::merge() should not be called staticall y in C:\xampp\htdocs\file-sync\ftpsync.php on line 462 0 file copied. Im using PHP version 5.3.5 CLI Using latest downloadable version of PHP FTP Synchronizer.
2011-05-30 10:41:42

scriptol

The command should be:
php ftpsync.php -llogin -ppassword C:\xampp\htdocs\test ftp.xxxx.com -d/remotedir -bd:\backupdir
login: the ftp login password: the ftppassword followed by the local directory ftp.xxxx.com the ftp URL remotedir the directory on the server, often htdocs or www d:\backupdir a drive and directory for a backup of the local image of the site, actually a backup of c:\xampp\htdocs\test
2011-05-30 11:21:40

fetto

Thanks for the answer! Yes i know that works, but i need a relative path. Is that not possible?
2011-06-01 08:41:43

scriptol

If the local image of the site is in the same directory that FTP synchronizer, you can omit the drive ie. c: and use just \xampp\htdocs\test Otherwise you must move the script on the same drive. The name of the directory is not important for the script.
Forum

FTP Synchronizer - Entering Passive Mode

2010-02-11 15:36:03

alexSherby

Hello, When I run ftpsync.php, everything goes well for about 15 seconds. Then a warning message appears and no more files uploaded. The following message appears: * I have hidden numbers
Warning: ftp_put (): Entering Passive Mode (x, x, x, x, x, x) .. in /home/ftpsync/ftpsync.php on line 215
Can you help me understand what is happening? Thank you
2010-02-12 12:36:35

scriptol

Hello, Does the message appears after some files were uploaded, of before any file loaded? In the second case, the server could have disabled the passive mode. You can verify that with Filezilla that uses the passive mode too. If it works with Filezilla, the problem is elsewhere.
2010-02-15 07:34:48

alexSherby

The message appears after some files were upload. (and it's not the same numbrer each time) It works fine with Filezilla... So, where do you think the problem is?
2010-02-15 12:52:37

scriptol

Rather hard to anwser! I use it each day, sometimes with a very big lot of files and until an hour for checking all the external links in the file uploaded. It works fine for me, on several hosts. Unless I have more precisions, another error message, I can not know what happens. But you can change some PHP parameters in php.ini as this could has the effect you described:
max_execution_time = 3600
The default of 30 seconds is not enough. Must be 3600 at least. No reason to limit locally the execution time!
memory_limit = 1024M
The default 128 mega seems enough, but actually this is often too small. Increase it to 1024M. This does suppress two reasons that impeach a script to run properly.