|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55101 Reflection tries to find symlink() and readlink() when they don't exist
Submitted: 2011-07-01 08:51 UTC Modified: 2017-10-24 08:04 UTC
From: Assigned: requinix (profile)
Status: Closed Package: Reflection related
PHP Version: 5.4.0alpha1 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2011-07-01 08:51 UTC]
These two functions are available on Windows >= Vista since PHP 5.3.0. The problem is that reflection have some pointers on them even in Windows < Vista (e.g. XP) where they are not available.

Test script:
$r = new ReflectionExtension("standard");

Expected result:

Actual result:

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find extension function readlink in global function table

Warning: ReflectionExtension::getFunctions(): Internal error: Cannot find extension function symlink in global function table


disable-functions.patch (last revision 2011-08-30 13:13 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-01 08:54 UTC]
The first line of Test script should be:


It outputs bool(false) mentioned in the result.
 [2011-07-01 09:03 UTC]
-Status: Open +Status: Bogus
 [2011-07-01 09:03 UTC]
They are only available in vista and later.
 [2011-07-01 09:04 UTC]
They are also dynamically available, we remove them at init time if the Windows 
version is < vista.
 [2011-07-01 09:06 UTC]
-Status: Bogus +Status: Open
 [2011-07-01 09:06 UTC]
re-open, but really not sure if it is fixable in reflexion, but there is no bug in 
these functions per se :)
 [2011-07-01 09:07 UTC]
-Summary: Functions symlink() and readlink() are missing on Windows < Vista +Summary: Reflection tries to find symlink() and readlink() when they don't exist
 [2011-07-01 09:07 UTC]
I know, it is even mentioned in the bug report. The problem is that Reflection doesn't know it and produces an Internal error.
 [2011-07-01 09:19 UTC]
It certainly does something nasty, can you try to figure out where pls?
 [2011-07-01 09:40 UTC]
I've looked in the source codes but I didn't get a clue how is it achieved that readlink() is disabled on Windows < Vista.

I also don't see anything related at
 [2011-07-01 18:43 UTC]
This specific windows disabling stuff is done at but I think it might be handled like we treat the disable_functions INI entry at
 [2011-08-30 13:13 UTC]
The following patch has been added/updated:

Patch Name: disable-functions.patch
Revision:   1314710033
 [2011-08-30 14:18 UTC]
-Assigned To: +Assigned To: pajoye
 [2011-08-30 14:18 UTC]
I don't have a Windows build environment.. but I believe the attached patch fixes 
this issue, and makes more sense :]

Could you verify it for me Pierre?
 [2017-10-24 07:35 UTC]
-Status: Assigned +Status: Open -Assigned To: pajoye +Assigned To:
 [2017-10-24 08:04 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: requinix
 [2017-10-24 08:04 UTC]
Windows < Vista is no longer supported.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 07:01:28 2024 UTC