[dokuwiki] Re: Class redeclaration error under OS X Lion

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 3 Jan 2012 23:35:10 +0000

On 3 Jan 2012, at 19:50, Chris Tapp wrote:

> On 3 Jan 2012, at 11:27, Andreas Gohr wrote:
> 
>>> The development pages do say that the class name and plugin name should be
>>> the same (which I assume also means case-wise), so it seems to be a
>>> 'reasonable' error, but why would it only show for one of the systems?
>> 
>> Because one of your systems has a case-insensitive file system?
> 
> No, they are all case sensitive.
> 

Does PHP know that?

This is actually a little complex. A couple of underlying questions:

- Does the Lion PHP know its working with a case insensitive file system?
- Is there any hardcoded attempt to load the plugin?

and three things:

- DokuWiki itself only loads plugins based on the file names it reads from the 
plugin directory.  I.e. if only DokuWiki core is loading plugins the error 
should not be able to occur.
- Plugin files are loaded using include_once.  If PHP knows its using a case 
insensitive file system the error should not be able to occur.
- If custom code is attempting to load the plugin component using a hard coded 
name (e.g. "misra_attributevalue") and PHP thinks the file system is case 
sensitive and the filename is a case insensitive match but not a case sensitive 
one (i.e. dokuwiki is loading misra_attributeValue), you have the possibility 
of the error you're seeing.

Plugin loading has been completely revamped for Angua.  My reading of the code 
is the error you're seeing could no longer happen.

- Chris


--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: