|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1531 require() causes flex scanner error
Submitted: 1999-06-12 07:14 UTC Modified: 2001-02-10 13:40 UTC
From: graeme at kc dot co dot nz Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 OS: Linux-2.0.36 x86
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: graeme at kc dot co dot nz
New email:
PHP Version: OS:


 [1999-06-12 07:14 UTC] graeme at kc dot co dot nz
A condition arose where require() was called with "./" as the file to include. This caused the error "input failure in flex scanner" to occur.
Granted, including "./" is kinda dumb :)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-20 21:06 UTC] jim at cvs dot php dot net
Zeev knows about this one, and I believe it will
be fixed in PHP4. There may actually be a very
old bug on this as well.
 [2000-08-17 10:57 UTC]
still there even in 4.0.1
 [2000-08-17 11:07 UTC]
I don't see problem here. ./ is not a file, and reading it as a file fails. So it should be.
 [2000-08-17 11:21 UTC]
still it should not result in a parse error

it should produce a warning 

  PHP Warning:  Failed opening './' for inclusion 

as with other unknown files
 [2000-08-17 11:48 UTC]
BD>> still it should not result in a parse error

> It's not parse error, please read the message.
> It didn't failed opening, it failed reading. 
> And require is not allowed to fail.
> That's not unknown file, that's known non-file.
>Stanislav Malyshev          

ok, got it now, i thought it was related to just ./,
not directories in general

but it fails for include to, while including for
example a non-existing file produces the message
i cited above and the error message is very

so i move this on to feature requests:

1) should give clearer error-message

2) at least include should treat directories
   like nonexistant (or empty?) files
   and issue a warning instead of a fatal error

 [2001-02-10 13:25 UTC]
4.0 still gives the same message.
 [2001-02-10 13:40 UTC]
intended behavior
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Sep 26 20:03:36 2021 UTC