|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-15 11:46 UTC] johannes@php.net
-Status: Open
+Status: Bogus
[2011-07-15 11:46 UTC] johannes@php.net
[2011-07-15 12:06 UTC] yurtesen at ispro dot net
[2011-07-15 12:08 UTC] yurtesen at ispro dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 27 17:00:01 2025 UTC |
Description: ------------ Actually, I am not sure how to track this problem since I couldnt replicate it using a simple test case. I use a software which has a pile of user functions. It loads a common file in each page using require_once() first page loads -> actual page (and both loads the common php file) This common file have function definitions. The problem is that there is a function in the common file which has name getUserID() and it is possible to call this function from the 'first' page, but when one tries to call it from the 'actual' page you get an undefined function error. (yes the require_once for the common page is on the top!). After much research, I found out that somehow PHP changed the function name into lowercase. As a side note, this used to function fine in PHP 5.3.2 and FreeBSD 7.x, I upgraded to FreeBSD 8.x and PHP 5.3.6 (with same configurations) and the problem occured. I can copy/paste the function into the 'actual' file and PHP does not complain about it being redefined (and actually it becomes usable again). Test script: --------------- Below is output of (note that the getUserID is double): print_r(get_defined_functions()); [user] => Array ( [0] => getvariables [1] => isempty [2] => checkpwd [3] => userexists [4] => iscookieset [5] => checkuser [6] => gettotalusers [7] => gettotaladmins [8] => gettotalsupporters [9] => getuserinfo [10] => listmembers [11] => getannouncements [12] => getuserlist [13] => getuserid [14] => getgroupid [15] => getgroupname [16] => groupexists [17] => getpriority [18] => getstatus [19] => issupporter [20] => isadministrator [21] => getsgroup [22] => getgrouplist [23] => getugrouplist [24] => ingroup [25] => getugroup [26] => getmessage [27] => printerror [28] => printsuccess [29] => getrank [30] => getrpriority [31] => getrstatus [32] => gethighestrank [33] => getlowestrank [34] => getsecondstatus [35] => getsecondpriority [36] => getprioritylist [37] => getcategorylist [38] => getstatuslist [39] => createheader [40] => creategroupmenu [41] => createprioritymenu [42] => createstatusmenu [43] => createthememenu [44] => createlanguagemenu [45] => createtimeoffsetmenu [46] => displayticket [47] => createticketinfo [48] => createcategorymenu [49] => createkcategorymenu [50] => createplatformmenu [51] => updatelog [52] => getcurrentlog [53] => deletefromgroups [54] => gettotalnumopentickets [55] => gettotalnumclosedtickets [56] => gettotalnumtickets [57] => validemail [58] => starttable [59] => endtable [60] => sendmail [61] => getemailaddress [62] => showformattedtime [63] => listplatforms [64] => getnumplatforms [65] => listkcategories [66] => getnumkcategories [67] => createkbmenu [68] => makeclickable [69] => setresponse [70] => createviewablebymenu [71] => convertfilesize [72] => getlanguage [73] => createsgroupcheckboxes [74] => createugroupcheckboxes [75] => gettimeoffset [76] => getlastactivetime [77] => stripscripts [78] => getdefaultsupportergroupid [79] => getthemevars [80] => getthemename [81] => listopentickets [82] => getsgrouplist [83] => listbypriority [84] => listbystatus [85] => getnumbergroups [86] => getuserinfo [87] => getuserid [88] => getgroupid [89] => createticketinfo [90] => getdefaultsupportergroupid ) Expected result: ---------------- I expect that function names do not change into lowercase when used inside a file which was loaded by require() And, I tried to test this with a small test case, but PHP worked fine, any hints on how to debug the issue? I didnt re-test installing PHP 5.3.2 yet.