Wedge

Public area => The Pub => Off-topic => Topic started by: Arantor on August 30th, 2011, 06:03 PM

Title: Not really off topic but I'm short on ideas.
Post by: Arantor on August 30th, 2011, 06:03 PM
OK, so in the setup I've been working on, there's a Addons/ folder in the same place where Sources and Themes are, and there's a global variable called $addonsdir that maintains its path. So far, so good.

Said variable is populated on install, editable in admin, but even though it exists and has content, is_dir returns false, as does opendir.

Were this a Linux host, I'd assume chmod was at fault, but it's on my PC, via WampServer. Anyone got any ideas WTF is wrong?
Title: Re: Not really off topic but I'm short on ideas.
Post by: Dragooon on August 30th, 2011, 06:19 PM
Can you tell the value of sourcedir and addonsdir? And you're positive the directory exists?
Title: Re: Not really off topic but I'm short on ideas.
Post by: Arantor on August 30th, 2011, 07:10 PM
Yup, both variables are defined, both in scope, both what they should be, but apparently one doesn't appear to be accessible.
Title: Re: Not really off topic but I'm short on ideas.
Post by: Dragooon on August 30th, 2011, 07:20 PM
You got windoozed? Well all I can say is try with another directory, I am out of ideas.
Title: Re: Not really off topic but I'm short on ideas.
Post by: Nao on August 30th, 2011, 08:28 PM
What are the folder attributes? I doubt it's that but..
Title: Re: Not really off topic but I'm short on ideas.
Post by: Arantor on August 30th, 2011, 10:20 PM
It's a normal folder...
Title: Re: Not really off topic but I'm short on ideas.
Post by: Nao on August 30th, 2011, 11:10 PM
Could you possibly commit your changes and I'll see I'd I have the same problem? We can always revert...
Title: Re: Not really off topic but I'm short on ideas.
Post by: Arantor on August 30th, 2011, 11:16 PM
Not right now, maybe later on when I'm back on my PC.
Title: Re: Not really off topic but I'm short on ideas.
Post by: Arantor on September 1st, 2011, 01:27 AM
Amazing what fresh eyes will do. The path was actually set wrong even though I swear I'd set it right, but then I found a bunch of other issues that prevented it from working, like some things I didn't realise that libxml (which underpins SimpleXML) does, like implicitly attempt to validate XML files given to it, and I don't have a complete DTD yet with which to set out such.

(Not that I really want to write the DTD, because I know it's going to be a pain in the arse to write, but still, it will have to be done sometime.)
Title: Re: Not really off topic but I'm short on ideas.
Post by: Nao on September 1st, 2011, 02:35 AM
Write your own parser, like I did :P
Title: Re: Not really off topic but I'm short on ideas.
Post by: Arantor on September 1st, 2011, 02:47 AM
Or turn off validation and do it by the seat of your pants :P

The structure is pretty complicated at its fullest, so I'd rather hand it over to SimpleXML to do the heavy lifting (and it means that Subs-Package can mostly be retired, too)