Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpDocumentor - Could not open input file: phpdoc.php

I'm trying to use phpDocumentor (for the first time, I have no idea what I'm doing). Actually, I want to use it only with SublimeText 2 and this plugin. Can you guide me step by step what should I do to make it working? Here's what I've done now: (I'm using Windows 7) Downloaded phpDocumentor from here and placed it somewhere. I've created system PATH's for phpdoc/bin (so phpdoc.bat can be executed by sublime plugin) and then also added system path to php (from WAMPserver installation)

When I try to use my plugin (or execute phpdoc inside console window) I get this error:

Could not open input file: \phpdoc.php

like image 845
smogg Avatar asked May 01 '12 21:05

smogg


4 Answers

Run:

pear

it will set %PHP_PEAR_PHP_BIN% for you.

like image 70
Włodzimierz Gajda Avatar answered Oct 23 '22 17:10

Włodzimierz Gajda


You will need to set the environmental path for "PHP_PEAR_BIN_DIR" to the directory where "phpdoc.php" is.

like image 37
Eydun Avatar answered Oct 23 '22 17:10

Eydun


I have changed phpdoc.bat file to point to exactly location of phpdoc.php

@echo off
if "%PHPBIN%" == "" set PHPBIN=php.exe
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "C:\wamp\bin\php\php5.3.10\phpdoc.php" %*
like image 10
Farid Movsumov Avatar answered Oct 23 '22 15:10

Farid Movsumov


On my windows 7 system, I have my set up phpDocumentor (version 2.6.1) in wamp and my paths are like:

D:\Projects\wamp\www\phpDocumentor
D:\Projects\wamp\www\phpDocumentor\bin 

Now what I did is I edited the phpdoc.bat file located at path:

D:\Projects\wamp\www\phpDocumentor\bin\phpdoc.bat

It contained code as shown below:

@echo off
if "%PHPBIN%" == "" set PHPBIN=php.exe
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "D:\Projects\wamp\www\phpDocumentor\bin\phpdoc" %*

So, I edited the last line "%PHPBIN%" "%PHP_PEAR_BIN_DIR%\phpdoc" %* with new code "%PHPBIN%" "phpdoc" %*. After phpdoc.bat looked like :

@echo off
if "%PHPBIN%" == "" set PHPBIN=php.exe
if not exist "%PHPBIN%" if "%PHP_PEAR_PHP_BIN%" neq "" goto USE_PEAR_PATH
GOTO RUN
:USE_PEAR_PATH
set PHPBIN=%PHP_PEAR_PHP_BIN%
:RUN
"%PHPBIN%" "phpdoc" %*

Thereafter I again ran the below command in cmd:

D:\Projects\wamp\www\phpDocumentor\bin>phpdoc

And the output was like:

D:\Projects\wamp\www\phpDocumentor\bin>phpdoc

Collecting files .. OK
Initializing parser .. OK
Parsing files

  [Exception]
  No parsable files were found, did you specify any using the -f or -d parame
  ter?

project:run [-t|--target[="..."]] [-f|--filename[="..."]] [-d|--directory[="..."
]] [--encoding[="..."]] [-e|--extensions[="..."]] [-i|--ignore[="..."]] [--ignor
e-tags[="..."]] [--hidden] [--ignore-symlinks] [-m|--markers[="..."]] [--title[=
"..."]] [--force] [--validate] [--visibility[="..."]] [--defaultpackagename[="..
."]] [--sourcecode] [-p|--progressbar] [--template[="..."]] [--parseprivate] [--
log[="..."]]

D:\Projects\wamp\www\phpDocumentor\bin>

So, the output showed that it worked successfully !!

like image 4
Rahul Gupta Avatar answered Oct 23 '22 17:10

Rahul Gupta