Keep one compiler installed and delete all old .a/.o/.ppu/.dcu files.
Therefore we recommend using Apache or other known working servers recommended in PasForum by experienced Powtils users.
Lighttpd has been tested by many developers with Powtils and they have reported it is working great with Powtils.
See also this forum post.
Bad syntax in the config file (lines without equal sign or pound sign) will cause:
We cannot trap all human mistakes made in config files, but in later versions we have made efforts to do more checks. For example in 1.6.1 if a line does not contain any name=value pair and contains text on a line without a pound comment sign, you will be given an error in your browser.
fpc program.pas -BIn rare cases, even the -B option may not be enough. You may have to delete all .a .ppu .o files in your -Fu search path directories, and any drectories that you are compiling in. There is also a tool called delp available to help you delete the files quickly. Delp will not know magically which directories you wish to delete files in. You have to tell delp of the directory(ies) or local directory (.\ or ./) that you wish to delete files in.
The problem with having two compilers installed is the .ppu/.o/.a files may start conflicting. Example: if you have some units kicking round in directories which have been compiled with 2.0.4 and others with 2.2.0. This can creep up on you when some directory in your -Fu search path has old units that you don't know about since you haven't looked in or compiled in that directory for a while.
If you are an advanced or experienced user, you can avoid these problems by making all the units output to a single directory with the -FU option. Then when you need to delete all the .ppu files, just navigate to the -FU directory and delete all units (note that -FU is a different compiler option than -Fu)
fpc program.pas -dSTATICAnd then you compile again without defines:
fpc program.pasOr if your unit contains:
unit somefile; {$DEFINE STATIC} ...FPC is not very smart when it comes to rebuilding units when DEFINES are changed on the fly. I have found I always need to rebuild units with -B if I change defines. (I guess this should be reported to FPC team as a compiler bug or a -d force build feature request)
So when flipping defines, always do commands like this:
fpc program.pas -dSTATIC -B fpc program.pas -BThat forces the compiler to rebuilt the units with the new define enabled or disabled. Otherwise, old cached .o/.a/.ppu units with old defines or lack of defines may be used by the compiler.
Some browsers cache requests in weird ways and has caused me issues during development.. even CGI programs and not just static html pages.
ERR XX see docs..when you delete all config files, then something is wrong with your system or server.
Without any config file, the program should always give you 'ERR XX see docs' since this error is output using simple system standard out calls. If these simple system calls won't work, nothing will. That's why this is a sanity check. Search your drive for all config files in your public html and cgi directories such as public_html/pwu/conf/.
Note: if you have disabled config files (available in 1.6.1 and later) then a simple hello world should always work as a sanity check. This is considering you have not used SetWebConfig in the hello world. I.e. a program like this:
uses pwumain; begin webwrite('hello!'); // and nothing more end.
Note: if you delete the config file then Gzip is not used to display the simple 'ERR XX: see docs' message. If you are using no config file define in 1.6.1, then buffering and compression is off by default.