wxWebServer evolved to Kolibri and Kolibri+ with PHP. This page is available only for historical reasons.
Frequently Asked Questions
If you don't find the answer to your wxWebServer question here, please send your question to wxwebserver@senkas.com.
PHP returns everything as a plain text and no headers?
PHP is running with CLI (Command Line Interface) SAPI. This is the default from 4.3 and later PHP releases. On Windows, make sure you use php-cgi.exe. On Mac, follow these instructions.
PHP $_POST array always empty. $_GET works fine.
This is an issue with PHP-CGI (documented here). $HTTP_RAW_POST_DATA is OK, but $_POST is empty. Use a work-around to populate the $_POST array. There are two alternatives:
- Enable $HTTP_RAW_POST_DATA in you php.ini (always_populate_raw_post_data=On) and than add this line to your code before using $_POST:
parse_str($HTTP_RAW_POST_DATA, $_POST);
- Or, in PHP5 you can also use stdin stream and get POST data from there. Add these lines to your code:
$post_data = file_get_contents('php://input');
parse_str( $post_data, $_POST );
Windows: Annoying cmd.exe window pop-up on CGI execution
If I were Steve Jobs, I could probably try to sell this as a feature, something along the lines "wxWebServer supports this unique visual CGI execution". Since I am not, I will just admit it is an annoyance.
It's the result of using wxShell and unfortunately there is no way to hide the execution when wxShell function is used. I have a code that would change cmd.exe parameters in the registry (and restore old values on exit) but ended up commenting it out. The main reason for removing it is that it's something messing with other application settings and it would require some security tweaks on Windows in order for wxWebServer to actually change that registry value. And that's not nice. BTW, the registy key in question is HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe.
You can, however, reduce the window size thus reducing the annoyance. Just select "Run..." and than "cmd.exe". Change properties on the shell window to be something like 5x5 characters in size. Apply those settings to the shortcut when asked. Of course, if you need to use command prompt in Windows, you will need to either restore the settings or create another shortcut to cmd.exe with preferred settings.