[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binarycloud-dev
Subject:    [binarycloud-dev] PHPDoc segfaults..?
From:       binarycloud-dev-admin () lists ! sourceforge ! net
Date:       2001-10-06 16:03:02
[Download RAW message or body]

hi all,

For some reason I can't get access to the php.net news server (is nntp down
on it? I can get http from it)..

anyway: please respond to me directly, enigma@turingstudio.com.

so:

I have a very large source tree (binarycloud) and I point PHPDoc at that
source tree, trying to get documentation.

Here's the result (the script is last):

alex@box docs> php -q StaticPHPDocBuild.php
Parser starts...
... preparse to find modulegroups and classtrees.
... parsing classes.
Segmentation fault (core dumped)
alex@box docs>

I'm running 4.0.6, this is PHPDoc from the latest pear CVS..
For the cli version I'm running, I jacked up the memory to allow for the
number of files. (Could this be the problem? not enough memory?)

If I run phpdoc on a very small set of files (just those classes in
binarycloud/base/core/), I get the following:

alex@box docs> php -q StaticPHPDocBuild.php
Parser starts...
... preparse to find modulegroups and classtrees.
... parsing classes.
... parsing modules.
... writing packagelist.
Parser finished.
Starting to render...
IntegratedTemplate Error: The name of a block must be unique within a
template. Found '__global__' twice. Unpredictable results may
appear.IntegratedTemplate Error: The name of a block must be unique within a
template. Found '__global__' twice. Unpredictable results may appear.
alex@box docs> 

I looked in the templates directory, and couldn't even find a unique
__global__ string.. I found _global_ in a couple block names, but they were
unique block names.

After the 'small tree' script, I _do_ get what appears to be complete xml,
so the notice is correct:

alex@box docs> ls html/
CVS/             class_Page.xml      classtree_Debug.xml
classtree_Sess.xml          warnings_parser.xml
README           class_Perm.xml      classtree_Lang.xml     elementlist.xml
class_Auth.xml   class_Request.xml   classtree_Page.xml     packagelist.xml
class_Debug.xml  class_Sess.xml      classtree_Perm.xml
phpdoc_elementlist.html
class_Lang.xml   classtree_Auth.xml  classtree_Request.xml
warnings_classanalyser.xml
alex@core docs> 


Here's my script:


<?php
    /**
     * You will by now have noticed that this is taken
     * directly from phpdoc.de
     */

    // HACK
    $default_site_name = 'default';
    // quick hack to insert a site name

    $start = time();
    
    // WARNING: long runtimes! Make modifications
    // to the php[3].ini if neccessary. A P3-500
    // needs slightly more than 30 seconds to
    // document phpdoc itself.
        
    // Directory with include files
    define("PHPDOC_INCLUDE_DIR", "../ext/phpdoc/");
    // Important: set this to the Linebreak sign of your system!
    define("PHPDOC_LINEBREAK", "\n");
    
    // main PHPDoc Include File
    include("../ext/phpdoc/prepend.php");
    
    $doc = new Phpdoc;
    
    // Sets the name of your application.
    // The name of the application gets used in many default templates.
    $doc->setApplication("binarycloud ".$default_site_name);
    
    // directory where your source files reside:
    $doc->setSourceDirectory('../base/core/');
    
    // save the generated docs here:
    $doc->setTarget('./html/');
    
    // use these templates:
    $doc->setTemplateDirectory("../ext/phpdoc/renderer/html/templates/");
    
    // source files have one of these suffixes:
    $doc->setSourceFileSuffix( array ("php") );
    
    // parse and generate the xml files
    $doc->parse();
    
    // turn xml in to html using templates
    $doc->render();
    
    printf("%d seconds needed\n\n.", time() - $start);
?>


tia, all

_alex
enigma@turingstudio.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic