Cannot run PHP this code on linux. Getting error_log

Discussion in 'PHP' started by pikus, Jun 15, 2012.

  1. #1
    Hello, this code should .tar a folder and upload it to an external FTP.

    $dir = '/testtt'; // Directory to backup.
    $filename = 'backups/backup' . date("MdY") . '.tar'; //path to where the file will be saved.
    
    $ftp_server = 'myserver'; //External FTP server
    $ftp_user_name = 'myusername'; //External FTP server username
    $ftp_password = 'password'; //External FTP server password
    
    if(system("tar cvf $filename $dir")){
    $conn_id = ftp_connect($ftp_server);
    
    $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_password);
    
    if (($conn_id) || ($login_result)) {
    
    $upload = ftp_put($conn_id, 'backups/' . date("MdY") . '.tar', $filename, FTP_BINARY);
    
        }
        
        
        ftp_close($conn_id);
    } //Initial if statement  
    PHP:
    I am trying to run it with the following command:
    php /backupscript.php
    Code (markup):
    But it doesn't work. In the error_log I see the following:
    [12-Jun-2012 23:49:09] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [12-Jun-2012 23:49:29] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0
    [12-Jun-2012 23:49:56] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0
    Code (markup):
    What does it mean?
     
    pikus, Jun 15, 2012 IP
  2. indiajobvacancy

    indiajobvacancy Banned

    Messages:
    341
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    taken from http://forums.cpanel.net/f5/php-startup-unable-load-dynamic-library-212142.html#post873722
     
    indiajobvacancy, Jun 15, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    IOW, uploadprogress.so is commented out in your php.ini file. Uncomment it. (If you're on a hosted site you may not have access to php.ini. In that case, call tech support at your host.)
     
    Rukbat, Jun 15, 2012 IP