|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58262 anything in php tags is stripped when using ssh2.sftp
Submitted: 2008-07-02 11:22 UTC Modified: 2008-12-20 12:29 UTC
From: tom at r dot je Assigned:
Status: Not a bug Package: ssh2 (PECL)
PHP Version: 5.2.5 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tom at r dot je
New email:
PHP Version: OS:


 [2008-07-02 11:22 UTC] tom at r dot je
When using sftp via fread(), anything between php tags is removed from the output.

Reproduce code:

echo 'two';

$stream = fopen("ssh2.sftp://$sftp$file", 'r');
echo filesize("ssh2.sftp://$sftp$file"); //CORRECT.
echo fread($stream, filesize("ssh2.sftp://$sftp$file")); // prints "onethree"

Expected result:
The entire contents of the file.

Actual result:
Contents of  the file without anything in between <? and ?>


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-20 12:29 UTC]
Please ensure that your are escaping your output properly based on the view you're using (ie, use htmlspecialchars). When outputting as HTML, you won't see things inside PHP tags.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Sep 23 13:01:24 2020 UTC