Doxygen latest release v1.7.1 - last page update Tue Jun 29 2010
Trouble shooting Doxygen's search engine on Windows

Problem

Doxygen PHP5 and Windows - If the search engine returns "No input file specified"

Solution

If you happen to encounter a problem with Doxygen returning a "No input file specified" error, when the search engine function is used, here's some things to look at...

Doxygen's search engine works out of the box, with nothing more than turning on the Search Engine option in the configuration setup, so if you encounter a problem, it's most likely going to be in your PHP configuration, your web server configuration, or possibly both.

Due to the extent of flexibility that PHP provides and the many different web servers available, troubleshooting any combination can require a patient and methodical approach, but some things are good sense to try first.

Don't be afraid to install PHP as a zip install and follow PHP's guide on their web site. Many have found that attempting to use the binary installer version of PHP5 causes confusion, unless using Apache or IIS web servers, which the binary targets normally. Even then there is no guarantee as these programs evolve, so it's recommended to do the zip file installation and let the configuration of the zip file folders unfold in C:\PHPn, as typical. In this case, PHP5, installed at the system root directory.

Make certain that you edit your system path to include the PHP directory and restart your system.

PHP no longer bundles the "extension" files with their package, so you will need to download those separately and install them in the PHPn\ext folder, as well.

PHP instructs to select one of the php.ini files provided and rename it to php.ini as a beginning template.

Create a test file in a text editor and name it info.php as follows...

	<?php
	phpinfo();
	phpinfo(INFO_MODULES);
	?>
Assuming that you have a working web server that will display it's home page properly, drop this file into your web server's base public directory, open a browser and browse to that file as you would any website. e.g. http://www.mywebsite.com/info.php

You should get a nicely formed table layout back, that shows PHP's present configuration, if not then you need to return to the the php.ini file and begin turning off any unnecessary functions like zlib, safe mode and any any other functions not needed. Also make sure you have set up the proper MIME type for PHP, that you identified the folder for PHPn accurately and if you're using the executable cgi form of PHP, that you set the MIME to process as an executable, rather than parsing into the web server's cgi folder. In most cases having php-cgi.exe located inside the C:\PHPn folder is adequate, since PHPn is listed in your system path.

Do turn on any error reporting and error logging you find in the php.ini file, to assist in testing of PHP related errors during testing. Note however, that a failure of some functions, is not necessarily an error and may not produce an error message.

Turn on any debug capabilities that your web server will provide as well, as watching the log files at the web server will show you if your query requests are making it through the web server.

The first thing that can affect the Doxygen's search engine, is whether or not you have declared inside the php.ini file, a root directory as "doc_root=". Depending on how your webserver parses and passes queries into PHP, setting this directive can restrict PHP from leaving the declared path to the webserver, in order to parse the path of a PHP script, forcing an external query to become dead-ended. If you find a path identified there, comment this line out and try another search. If you found no path identified in doc_root, try placing one there and see if it the opposite helps. The other area to look at is the use of the FORCE_REDIRECT directive in the php.ini file. This will depend on which PHP compiled package you used and the type of web server you're running, as well as the "doc_root=" path being set.

The best suggestion is to try without either FORCE_REDIRECT or "doc_root=", but the php.ini file gives some suggestions that indicate ... "So long as PHP was compiled with FORCE_REDIRECT, (the typical Widows zip file download is), then PHP will have this function set to true by default, unless you explicitly tell it not to use FORCE_REDIRECT. Assuming this is the case and PHP is defaulting FORCE_REDIRECT to on, then the explicite "doc_root=" should not be used."

Otherwise, if you know or suspect that FORCE_REDIRECT is not in your copy of PHP, or if you will try setting FORCE_REDIRECT explicitly to off, then you should try setting doc_root to point to your web server's root directory, if leaving doc_root off did not work.

If you succeed, then make a copy of the php.ini file before going on to turn other functions back on in tuning your performance and security measures in php.ini.

If these measure still have not brought success, then it's likely you may benefit from using the forums at PHP, since now your prepared to answer these above simple measures. At least your familiar with some of the areas others will direct you to.

Be aware that the search engines will yield thousands of examples of those fighting to place various dlls and support files in several places like the Windows or Win32 directories and normally these measures simply are not required unless your Windows system is not set up typical of most. In most cases, blindly copying files around in the operating system will only stand to invite unreliable behaviour and version mis-matches later on, so best to seek out someone experienced and follow their guidance one step at a time, and take some notes along the way, if these simpler measures don't work out.

Acknowledgements

This documentation was kindly provided by Mike Wilson.