[pmwiki-users] Error when using 'call system' in code block

Patrick R. Michaud pmichaud at pobox.com
Sat May 5 07:54:48 CDT 2007


On Sat, May 05, 2007 at 08:39:43PM +1200, Luis wrote:
>    (:source lang=SAS:)[@
>    data _null_;
>        call system('c:\simproj\analysis.bat');
>    run;
>    @]
> 
>    when saving the page I get the error message ""The server is temporarily
>    unable to service your request due to maintenance downtime or capacity
>    problems". I have tried several code examples, and have problems only with
>    call system.
> 
>    Does anybody:
>    1. Know why is this happening?
>    2. have a workaround?

My guess is that your server has mod_security enabled, and
mod_security is disallowing the "system(" part of your post
as being a possible site attack.

The easy way to verify this would be to simply create a post
that doesn't contain any sourceblock directive -- i.e., edit
a page and put just the text "system(" or "system('...')".
If the server still blocks the post, it's likely a mod_security
issue.

See http://www.pmwiki.org/wiki/PmWiki/Troubleshooting#mod_security .

If this is indeed the problem, then you'll want to either disable
mod_security for your PmWiki site, or else figure out a way to 
write the content such that it doesn't trigger mod_security.

In other cases I've recommended using [=...=] as a workaround to
separate the "system" from the "(" ... i.e., writing "[=system=](" 
or "system[==](".  But since this text is already inside of a [@...@]
section, that's not going to work.  Maybe someone else has an idea.

Anyway, that's my guess as to the problem -- please let us know
how it turns out!

Pm



More information about the pmwiki-users mailing list