|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #297 printing quotation mark read by fgets-function
Submitted: 1998-04-21 22:57 UTC Modified: 1998-05-01 14:31 UTC
From: gihwaja at chollian dot net Assigned:
Status: Closed Package: Other
PHP Version: 3.0 Release Candidate 4 OS: SunOS 5.5.1
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: gihwaja at chollian dot net
New email:
PHP Version: OS:


 [1998-04-21 22:57 UTC] gihwaja at chollian dot net
Let's say that "quotation" file has only five quotation mark.
(that is, """"")
and execute following php-script

    $fp = fopen("quotation", "r");
    echo fgets($fp, 100);

The result is
of length 10, not 5.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-05-01 14:31 UTC] jim
This is happening because you have magic_quotes_runtime
on in your configuration file. Either turn that off,
or run stripslashes() on the string before printing it.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 21:01:26 2023 UTC