Page 1 of 1

phpdoc, livedocs, and cygwin

Posted: Fri Mar 30, 2007 9:39 pm
by Ambush Commander
I'm curious: has anyone here ever gotten phpdoc (PHP's documentation source files), livedocs (a rapid-development interface for phpdoc) and cygwin working together? I've been trying for the last week and "Woe on me!" Files randomly don't exist, a compiled-for-Windows PHP installation required me to patch the entity file generator, directory names with spaces in them combust spectacularly and xsltproc gobbles up 400 MB worth of memory while trying to parse the manual. As of right now, it sort of works but I keep getting these errors while using ./build.sh:
Warning: file_get_contents(c:/php/phpdoc\xsl/version.xml): failed to open stream: No such file or directory in C:\php\livedocs\mkindex.php on line 141

Call Stack:
0.0590 1. {main}() C:\php\livedocs\mkindex.php:0
163.8730 2. build_func_list() C:\php\livedocs\mkindex.php:397
163.8730 3. file_get_contents() C:\php\livedocs\mkindex.php:141

BAD ID: function.class.com (c:/php/phpdoc\en\reference/com/functions, class.com.xml, reference)
BAD ID: function.class.dotnet (c:/php/phpdoc\en\reference/com/functions, class.dotnet.xml, reference)
BAD ID: function.class.variant (c:/php/phpdoc\en\reference/com/functions, class.variant.xml, reference)
BAD ID: function.use-oo-instead (c:/php/phpdoc\en\reference/com, use-oo-instead.xml, reference)
And I cannot fathom why. I've tried changing the missing file to xsl/version.xml to phpbook/phpbook-xsl/version.xml by patching mkindex.php:141 but I still get the bad ID warnings. Plus, the whole build process takes a ridiculously long time, making it difficult for me to experiment around.

Help!

Posted: Tue Apr 03, 2007 12:37 am
by Benjamin
The slashes are wrong.. c:/php/phpdoc\xsl/version.xml

Posted: Tue Apr 03, 2007 8:34 am
by Ambush Commander
I should update this topic, I guess. That wasn't the problem: the file just didn't exist at all. I got a nice email from Hannes Magnusson (he tried registering for the forum but never got the registration email), and with his help I resolved the issue. The main things:

1. The phpdoc directory was reorganized, so the file paths had to be patched. Instead of xsl/* it would be docbook/docbook-xsl/ and phpbook/phpbook-xsl/ (depending on its function)

2. The bad ID problem is a known issue, and doesn't seem to cause any problems, so it can be safely ignored

3. The build process does take a lot of memory and a lot of time, no way around that. Using libxslt .18 or later can help.

4. The patched file entity generator was necessary for a configuration quirk on my side, since none of the livedocs developers use Cygwin. More research is necessary before a patch for that can be made

5. build.sh doesn't properly quote parameters, so OUTPUTDIR cannot have spaces in it. This is easily worked around

Hannes will be working on livedocs this summer, getting it up to date. For now, I've got my copy working

Posted: Tue Apr 03, 2007 8:51 am
by Chris Corbyn
Ambush Commander wrote:I got a nice email from Hannes Magnusson (he tried registering for the forum but never got the registration email)
Hmm, I wonder if we're still having registration/email issues. We do have new users signing up and making new posts but we've had all kinds of phpBB/email issues lately :(

Posted: Tue Apr 03, 2007 8:51 am
by Ambush Commander
Perhaps adding an "email the administrators" link would be helpful if the email doesn't go through.

Posted: Tue Apr 03, 2007 9:19 am
by feyd
There are links provided on the registration page to email us already.

Posted: Tue Apr 03, 2007 10:42 am
by Ambush Commander
Oh, alright. I wouldn't know, since I haven't registered in a long time. ^_^ Maybe it needs to be in a more prominent place:
Hannes Magnusson wrote:Anyway, I tried to register but never got the 'activation mail' and
there is no 'administrator' mail listed to contact or anything.

Posted: Tue Apr 03, 2007 3:17 pm
by RobertGonzalez
I'd be willing to bet it got caught by the spam checker. As soon as the email from address changed from jason to no-reply, my devnet mails went into the trash.

Posted: Wed Apr 04, 2007 10:48 am
by feyd
I've switched the address to registration@forums.....

It may work better for some.

Posted: Wed Apr 04, 2007 10:53 am
by RobertGonzalez
The registration address went into my inbox by default.

Posted: Wed Apr 04, 2007 10:53 am
by feyd
goodie-goodie.

Posted: Wed Apr 18, 2007 3:42 am
by bjori
Ambush Commander wrote:1. The phpdoc directory was reorganized, so the file paths had to be patched. Instead of xsl/* it would be docbook/docbook-xsl/ and phpbook/phpbook-xsl/ (depending on its function)
Fixed in CVS :)
Ambush Commander wrote:2. The bad ID problem is a known issue, and doesn't seem to cause any problems, so it can be safely ignored
I've figured out the issue here.. it really is more of a phpdoc problem rather than livedocs problem though.
I'll fix it in livedocs to begin with, soonish, as fixing it in phpdoc screws other stuff up.
This does need to be fixed in phpdoc eventually, even if only for consistency sake, but that is really a low priority task
Ambush Commander wrote:3. The build process does take a lot of memory and a lot of time, no way around that. Using libxslt .18 or later can help.
It does more than help, the build process takes my laptop 2-3minutes :D
The memory issue is nothing we can do about
Ambush Commander wrote:5. build.sh doesn't properly quote parameters, so OUTPUTDIR cannot have spaces in it. This is easily worked around
Fixed. OUTPUTDIR and every other path should be properly quoted in CVS

If any other issues come up I'd love to hear about it!
(And thanks for the bug reports & patches!)

-Hannes