3

I cannot generate the documentation of my project. Getting the error message under NetBeans "'"php.exe"' is not recognized as an internal or external command, operable program or batch file.". The ApiGen 2.8.0 standalone has been unzipped in a separate folder and its reference is given under Tools->Options->apigen. Any advice from anyone? Thks in advance.

Franz Froch
  • 31
  • 1
  • 2

1 Answers1

8

The problem is that your Netbeans installation does not know where your PHP executable is by default. You'll need to add the PHP path to your windows environment by following these steps;

  1. Unzip APIGen in a suitable location by personal preference
  2. Go to your PHP executable directory (For XAMPP on C it would look like C:\xampp\php
  3. Copy the location address in your window path at the top
  4. Open start menu and right click "Computer"
  5. Choose "Advanced system settings" to your left and click "Environment vars" in the new window.
  6. In the second list view, mark "Path" entry and click "Edit"
  7. Position cursor at the very end in the value field.
  8. Type semi-colon and paste your copied path on step #3, make sure your path ends with backslash.
  9. Click ok and then make sure to restart Netbeans.
  10. Go to Options -> PHP and then click "Search", Netbeans should now be able to find your PHP executable.

To set up APIGen in netbeans;

  1. Go to Options -> PHP -> APIGen
  2. Browse to your extracted APIGen location and select the apigen.bat file.
  3. You may also add " --debug" after apigen.bat in order to get detailed error reports if something fails.

Your system should now be ready to generate documentaiton. The first time you generate the documentation you'll be asked to select the output folder and what the documentation should cover.

Daniel
  • 3,726
  • 4
  • 26
  • 49