Search code examples
phpdoc

phpdoc web interface: Undefined offset: 1 in <PHPDOCDIR>\src\phpDocumentor\Console\Input\ArgvInput.php


I've installed phpdoc using the installer.php file, and when I open phpdoc.php from wamp (localhost/phpDocumentor/bin/phpdoc.php) I get this error:

 Notice: Undefined offset: 1 in D:\Tools\Programming\WebsiteBuilding\WAMP\wamp2.2e\www\phpDocumentor\src\phpDocumentor\Console\Input\ArgvInput.php on line 52

I set register argc argv to true in my WAMP php - settings, but I still get this.

What am I doing wrong?

Snapshot of the error:

Error snapshot


Solution

  • PHPDoc is intended for command line usage. The error you get means that you didn't provide an argument. This means you can't call PHPDoc via webserver, you can only view the generated docs.

    A typical call to phpdoc under Windows looks like that (on the command line):

    phpdoc.bat -d src -t docs
    

    Where src is the directory that your sources are and docs the directory where the documentation should be generated.

    For more instructions see the PHPDoc installer documentation.