Login   Register  
PHP Classes
elePHPant
Icontem

Error

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      FTP Sync  >  All threads  >  Error  >  (Un) Subscribe thread alerts  
Subject:Error
Summary:Error
Messages:8
Author:AdelindaCalabre
Date:2012-02-10 17:54:11
Update:2012-02-11 14:36:55
 

  1. Error   Reply  
Picture of AdelindaCalabre
AdelindaCalabre
2012-02-10 17:54:11
Hi,
I've downloaded the script for testing purpose. After setting host, user and password, I upload and test the script, but it returns this error:

Warning: require(lib/FTPSync.php): failed to open stream: No such file or directory in /web/htdocs/www.______.com/home/_testing/index2.php on line 2 Warning: require(lib/FTPSync.php): failed to open stream: No such file or directory in /web/htdocs/www.______.com/home/_testing/index2.php on line 2 Fatal error: require(): Failed opening required 'lib/FTPSync.php' (include_path='.:/php5.3/lib/php/') in /web/htdocs/www.______.com/home/_testing/index2.php on line 2

this is the index2.php file:

<?php
require 'lib/FTPSync.php';
$sync = new FtpSync('___.___.___.__', 'user', 'pass');
$sync->enableLog()
->ignore('.DS_Store')
->useStrategy(FtpSync::SYNC_BY_MTIME)
->remote('/form', '/tests');

  2. Re: Error   Reply  
Picture of Amin Saeedi
Amin Saeedi
2012-02-10 20:00:37 - In reply to message 1 from AdelindaCalabre
Hi,
This error has nothing to do with the library, you have problem loading the FTPSync.php file, check the permissions pls.

Regards,
Amin

  3. Re: Error   Reply  
Picture of AdelindaCalabre
AdelindaCalabre
2012-02-10 20:23:25 - In reply to message 2 from Amin Saeedi
Hi,
Thanks for all.
I've set the permission to 755. Something wrong?

  4. Re: Error   Reply  
Picture of Amin Saeedi
Amin Saeedi
2012-02-10 20:46:14 - In reply to message 3 from AdelindaCalabre
I don't see your problem. Please run the Cli.php from command line (after cd to lib/) and check if you still have the problem

  5. Re: Error   Reply  
Picture of AdelindaCalabre
AdelindaCalabre
2012-02-10 22:54:41 - In reply to message 4 from Amin Saeedi
If I run the Cli.php it works, but if I run the index.php with the code in the readme (changing the parameters) it returns me this:
Fatal error: Class 'Cli' not found in C:\xampp\htdocs\prove\ftpsync-0.9\ftpsync2\lib\Logger.php on line 100

  6. Re: Error   Reply  
Picture of Amin Saeedi
Amin Saeedi
2012-02-11 06:27:38 - In reply to message 5 from AdelindaCalabre
Cli class is supposed to be run on the command line, not browser.
If it works it means that your problem is including the required files.
Try running the index.php (the example included in the package)

  7. Re: Error   Reply  
Picture of Amin Saeedi
Amin Saeedi
2012-02-11 06:28:52 - In reply to message 5 from AdelindaCalabre
If it works it means that your problem is including the required files.

  8. Re: Error   Reply  
Picture of AdelindaCalabre
AdelindaCalabre
2012-02-11 14:36:55 - In reply to message 6 from Amin Saeedi
Hi,
Yes Cli class run from command line. It works but It returns:

Size comarision remote with local host started at 2012-02-11 15:23:08.(based on remote host) Error while downloading FILETEST.XML
Size comparision finished at 2012-02-11 15:23:09 Total Files (remote): 1 | Total Downloaded: 0

Can you provide me an example of Strategy_Size::remote call?
I use this:

$ftp->useStrategy(FtpSync::SYNC_BY_SIZE,'remote')
->remote("folder/inner", "sync");

Any problem?