PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 6th, 2015, 09:26 AM
mapg mapg is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 8 mapg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 46 m 58 sec
Reputation Power: 0
Unhappy General - PHP exec abbreviates and cut output made by unbuffer ???

Hi all,

I try to catch and save in a log file the output of LFTP using unbuffer, because seems impossible to get it via other ways, namely the usual > logfile.txt

Certainly the format shown in the shell is what I prefer because other dialogs (like using --log= or
xfer:log-file) don't show the information about the progress so good as is shown in the shell.

Let me show you all the line I'm using ...

unbuffer lftp -e "set ssl:verify-certificate no; set ftp:ssl-protect-data yes; set ftp:ssl-protect-list yes; mirror --reverse /path/to/send folder_to_receive_files ; quit" -u user@server.com,password ftp.server.com > mylog.log 2>&1

In the shell (I'm using Ubuntu) and using unbuffer I get the output well ...
Code:
mkdir `folder_to_receive_files' [Connecting...]
mkdir `folder_to_receive_files' [Waiting for response...]

Transferring file `OctoCod_1920x1080_Hitman.hevc.good.mp4'
`OctoCod_1920x1080_Hitman.hevc.good.mp4' at 0 (0%) [Waiting for response...]
`OctoCod_1920x1080_Hitman.hevc.good.mp4' at 76744 (0%) [Sending data]
`OctoCod_1920x1080_Hitman.hevc.good.mp4' at 608160 (2%) 397.4K/s eta:58s [Sending data]
.. etc ...


BUT this is the problem!! ...

Passing above set of LFTP commands through PHP exec, namely exec('unbuffer lftp -e "set ssl:verify-certificate no; set... etc, etc);

I cannot get the right dialog, but I get a cut version of the full dialog, like that ...
Code:
mkdir `folder_to_receive_files' [Connecting...]
mkdir `folder_to_receive_files' [Waiting for response...]
`...d_1920x1080_Hitman.hevc.mp4' at 0 (0%) [Waiting for response...]
`...d_1920x1080_Hitman.hevc.mp4' at 125976 (0%) [Sending data]
`...d_1920x1080_Hitman.hevc.mp4' at 660288 (2%) 431.4K/s eta:63s [Sending data]
`...d_1920x1080_Hitman.hevc.mp4' at 1211976 (4%) 492.7K/s eta:54s [Sending data
`...d_1920x1080_Hitman.hevc.mp4' at 1785384 (6%) 579.6K/s eta:45s [Sending data
`...d_1920x1080_Hitman.hevc.mp4' at 2358792 (8%) 607.8K/s eta:42s [Sending data
`...d_1920x1080_Hitman.hevc.mp4' at 2932200 (10%) 619.6K/s eta:40s [Sending dat
`...d_1920x1080_Hitman.hevc.mp4' at 3505608 (12%) 639.3K/s eta:38s [Sending dat
`...d_1920x1080_Hitman.hevc.mp4' at 4079016 (14%) 634.0K/s eta:38s [Sending dat


It's something strange and is making me crazy. I have been two full days fighting against this problem.

Anyone has some idea about what is happening?

Thank you very much in advance for your help.

Mapg

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > General - PHP exec abbreviates and cut output made by unbuffer ???


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap