From:             
Operating system: FreeBSD 8.2-STABLE
PHP version:      5.3.6
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:Certain function names are changed into lowercase....

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.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=55210&edit=1
-- 
Try a snapshot (PHP 5.2):            
https://bugs.php.net/fix.php?id=55210&r=trysnapshot52
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55210&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55210&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55210&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55210&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55210&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55210&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55210&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55210&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55210&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55210&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55210&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55210&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55210&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55210&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55210&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55210&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55210&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55210&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55210&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55210&r=mysqlcfg
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55210&r=trysnapshot54

Reply via email to