Don't get GraphViz and phpDocumentor to work

旧时模样 提交于 2019-12-24 02:44:15

问题


I'm trying to create a php documentation on my local XAMPP host (on Windows 7) with phpDocumentor.phar (v2.). It gives me (after parsing all the files) this error: Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?

I searched a lot, but nothing helps. What does 'path' means? If I open a command box at any location I can start the dot.exe (which gives me no output but waiting prompt). In my environment path variable the bin folders is added. GraphViz is installed correct in Program Files and runs standalone.

What could I do or check?


回答1:


In order to get GraphViz running properly with a Windows based phpdoc installation, just put the GraphViz program directory (c:\some\path\graphviz\release\bin) to the Windows Path system variable.

In order to do this, follow these steps (Win7, please provide your OS version if this doesn't apply to your situation):

  1. From the desktop, right-click My Computer and click Properties.
  2. In the System Properties window, click on the Advanced tab.
  3. In the Advanced section, click the Environment Variables button.
  4. In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button.

Different directories are separated with a semicolon:

C:\Program Files;C:\Winnt;C:\Winnt\System32

It will most likely look a bit different in your enviroment, so please just take this for an example. Just add the GraphViz Path at the end like this:

C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\somefolder\graphviz\release\bin

I'm not too sure if you have to reboot your system after changing this value. You had to do this in the old days of Win2k, and I just don't know if this still applies to modern Windows versions. It surely doesn't hurt!

After this, phpdoc should be able to find the dot command.




回答2:


The steps to resolve this error are:

  1. download Windows Packages from https://graphviz.gitlab.io/_pages/Download/Download_windows.html

  2. Just install it

  3. add c:\Program Files\Graphviz*\dot.exe or c:\Program Files (x86)\Graphviz*\dot.exe to your environment variable PATH

  4. run phpdoc

  5. Re-start your machine & run phpdoc (if still shows the same error message)



来源:https://stackoverflow.com/questions/28194072/dont-get-graphviz-and-phpdocumentor-to-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!