Jump to content
Larry Ullman's Book Forums

Phpdocumenter Not Working Correctly


Recommended Posts

Guest Deleted

It keeps giving me this:


Usage:
  [options] command [arguments]
 
Options:
  --help           -h Display this help message.
  --quiet          -q Do not output any message.
  --verbose        -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  --version        -V Display this application version.
  --ansi              Force ANSI output.
  --no-ansi           Disable ANSI output.
  --no-interaction -n Do not ask any interactive question.
 
Available commands:
  help                Displays help for a command
  list                Lists commands
  parse               Creates a structure file from your source code
  run                 Parses and transforms the given files to a specified location
  transform           Converts the PHPDocumentor structure file to documentation
project
  project:parse       Creates a structure file from your source code
  project:run         Parses and transforms the given files to a specified location
  project:transform   Converts the PHPDocumentor structure file to documentation
template
  template:generate   Generates a skeleton template
  template:list       Displays a listing of all available templates in phpDocumentor
  template:package    Packages a template for distribution
Content-type: text/html

 

 

 

No matter what I do, I get that. 

 

Some Things I Tried:

phpdoc -q

php doc -v

phpdoc -d pathToMyDocsFolderHere -s pathToMyControllersFolderHere

phpdoc list

phpdoc -q help

 

All I want to do is get this to document the files in my controllers folder and put it in my docs folder. Is it broken?

Link to comment
Share on other sites

Guest Deleted

Ok, I tried these and got the same result:

 

phpdoc  parse -d pathToMyDocsFolderHere -s pathToMyControllersFolderHere

phpdoc  run -d pathToMyDocsFolderHere -s pathToMyControllersFolderHere

phpdoc  -d pathToMyDocsFolderHere -s pathToMyControllersFolderHere parse

phpdoc  -d pathToMyDocsFolderHere -s pathToMyControllersFolderHere run

 

Any other ideas?

Link to comment
Share on other sites

Guest Deleted

What operating system are you running? My host uses linux. Not sure what flavor.

You're putting in actual values for pathToMyDocsFolderHere and such, right? Yeah. I just didn't want to post them on the web. They look similar to these: 

/home/mywebsitename/application/docs/

/home/mywebsitename/application/controllers/ 

Link to comment
Share on other sites

Guest Deleted

Tried it. Same thing. I wonder if my phpDocumenter is just messed up. Know of any way to troubleshoot it?

 

And could the problem be with PuTTY? That's how I connect to the server's command line.

Link to comment
Share on other sites

Guest Deleted

Uhh...I have no idea. To install it I just pasted these into the command line: 

 

pear channel-discover pear.phpdoc.org
pear install phpdoc/phpDocumentor

 

 

 
I remember it saying it had successfully downloaded and installed it, but I don't remember any version information.
 
Is there a way I can find out what version it is?
Link to comment
Share on other sites

Hello,

 

In order to find phpdocumentor version, I thought it would come up in phpinfo, but that doesn't work. I also assumed that by typing the command

phpdoc -v

you would get the version. Didn't work either. phpdoc -h didn't have a version shortcut.

 

Use the following command in shell:

pear info PhpDocumentor
  • Upvote 1
Link to comment
Share on other sites

I'm surprised that phpdoc -v is not working, because your other attempts to use phpdoc resulted in the help menu. That would suggest you're able to trigger phpdoc. This is on a hosted, shared server? Have you been logging in as different users?

Link to comment
Share on other sites

Guest Deleted

Larry: Are you talking to me or ggirtsou?

 

Anyway I just tried phpdoc - v and it brought up the help menu. No surprise there. That menu loves me. :(

Link to comment
Share on other sites

I just passed the section of phpdoc about couple of days ago and all worked like a charm. I know this is of any help to you but at least I can confirm that it works as described in the book so you can concentrate on looking for a problem on your side. All I had to do is cd into the directory with the file I want to document and run:

phpdoc -f HelloWorld.php -t docs

Of course change HelloWorld.php with whatever your file name is and 'docs' with whatever directory you want to generate the documentation in

Link to comment
Share on other sites

I'm mostly in the dark here. I don't understand how it can be working to give you a version but not working in the sense of actually working. I guess my inclination is to take another tact and ask, "Do you really need to use phpDocumenter on your live server?" It's not something I've ever used on a live server, as only completed code should be put there (in theory). Kind of a cop-out, but still a valid question.

Link to comment
Share on other sites

Guest Deleted

"Do you really need to use phpDocumenter on your live server?"

 

Not if I can figure out how to get my site running on my computer (my "test server").

 

On that subject I'm actually still learning how to set up a test server. My site is a CodeIgniter site and that's more complicated than if it was just some little procedural site. So, I keep running into problems.

 

Right now it's stumping me because the images show up fine on the live site but not on my computer. I've checked the links and they're right. It has something to do with my .htaccess. If I erase everything from the file, the images start working. If it put it back, they mess up again. This .htaccess is the same one on the live site.

 

Here it is if you want to fiddle with it:

 

# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
RewriteEngine on


#RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-l


RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


ErrorDocument 401 /404.php


<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html "now"


</ifmodule>


<ifmodule mod_headers.c>
  # Cache specified files for 1 day
  <filesmatch "\.(jpg|jpeg|png|gif)$">
  Header set Cache-Control "max-age=86400, public"
  </filesmatch>
</ifmodule>


RewriteCond %{HTTP_REFERER} !^http://mysitenamehere.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysitenamehere.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysitenamehere.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://mysitenamehere.com$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]
Link to comment
Share on other sites

Guest Deleted

Nevermind. I figured it out on my own.

 

Edit: Nevermind again, apparently I didn't fix it. Guess I'll make a new thread.

Link to comment
Share on other sites

 Share

×
×
  • Create New...