Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    1
    Member #
    37705

    ssh2_scp_send() using php corrupts pdf

    I am having a problem when I am sending a pdf file to my server.

    my script works when I try to send .csv file but the problem occurs when I try to send a pdf file

    <?php
    $user= "username";
    $pass= "password";
    $src= "/home/desktop/myfile.pdf";
    $trg= "/server/path/myfile.pdf";

    $con = ssh2_connect('myserver.com', 22);
    ssh2_auth_password($con, $user, $pass);

    ssh2_scp_send($con, $src, $trg);
    ?>
    when I send pdf. it creates a pdf file in target location but its corrupted.

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 05:04 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com