[pmwiki-users] Can't get PmWiki: SiteAnalyzer to work

Lars Eighner surname at larseighner.com
Tue May 1 17:24:02 CDT 2012

On Tue, 1 May 2012, Al Louis Ripskis wrote:

> Guys, I'm attempting to secure my site.  According to the PmWiki
> instructions the first thing to do is site analysis.  After Downloading
> the analyze.php script and placing it in my cookbook/ directory.  and
> inserting in the config file the
> include_once("$FarmD/cookbook/analyze.php"); $AnalyzeKey = 'secret';
> I get these error messages when I boot up my site:

> Warning:
> include_once(/hermes/waloraweb003/b1294/pow.verist/htdocs/pmwiki/cookbook/analyze.php)
> [function.include-once]: failed to open stream: No such file or directory
> in /hermes/waloraweb003/b1294/pow.verist/htdocs/pmwiki/local/config.php on
> line 33

This says it cannot find analyze.php where you said it was.  You must double
and triple check the placement of the file and the include_once statement
until you find the problem.  Check for spelling and punctuation errors.  Are
quotes closed?  You would not get this message even if analyze.php were
perfect nonsense.

Make sure the file has the proper permissions for pmwiki.php to find it. 755
should work for unix-like systems; if you have another kind of OS, you'll
have to figure it out how to give it similar permisions to scripts in the
script directory or other cookbook recipies you are using that you know are

> Warning: Cannot modify header information - headers already sent by
> (output started at
> /hermes/waloraweb003/b1294/pow.verist/htdocs/pmwiki/local/config.php:33)
> in /hermes/waloraweb003/b1294/pow.verist/htdocs/pmwiki/pmwiki.php on line
> 1130

The most likely cause of this is a white-space character before the <?php
tag or after the ?> in one of the scripts.

The answers to this usually are: never use ?> in scripts you may write or
edit (it is unecessary in scripts like this, and should only be used in
documents where php and html are mixed) and if you cut and paste into a
blank or existing document, double check that there is nothing before the

You don't happen to have two <?php in config.php do you?

> Then if I still go ahead and try to analyze my site I get this:
> Detailed results
> Obtain site configuration ... no connection
> The analyzer was unable to connect to the site. This may be because the url was entered incorrectly, the site is behind a firewall, or is otherwise inaccessible to the pmwiki.org server.
> What do I need to do to correct this?

> Has anyone ever used the SiteAnalyzer? And did it work for you?

Just installed and tried it.  Worked like a charm.  You can also use it
per page without the form by browsing yourpageurl?action=analyze?key=secret

where secret is whatever you entered for $AnalyzeKey.

If your server is local so you can easily check the httpd error log, it may
be useful to use it per page until things are debugged to the point that
there are no errors in the log.

Best guess: quote not closed by matching quote in config.php

Lars Eighner
8800 N IH35 APT 1191 AUSTIN TX 78753-5266

More information about the pmwiki-users mailing list