Hi!
I have some fastcgi problems with the application of WDialog on a ubuntu
server 8.10 (virtual machine) and ubuntu server 9.04 (real machine).
I've tried to isolate the problem by using a simple example kept from
the WDialog example in wt-2.99.5 libraries.
I attach the source files.
It seems to be a server configuration error, because the application
works correctly on my notebook with debian installed, but I cannot find it.
I attach the file errorLog.txt with the firebug log and the
/var/log/apache2/error.log
Any suggestions?
Bye,
Stefano De Toni
De Toni Stefano
Fraz. Bivedo, 71
38071 -- Bleggio Superiore (TN)
cell. +393403772981
email: [email protected]
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#include <iostream>
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WEnvironment>
#include <Wt/WLineEdit>
#include <Wt/WMessageBox>
#include <Wt/WPushButton>
#include <Wt/WText>
#include "DialogExample.h"
using namespace Wt;
DialogExample::DialogExample(const WEnvironment& env)
: WApplication(env),
messageBox_(0)
{
setTitle("Dialog example");
new WText("<h2>Wt dialogs example</h2>", root());
WContainerWidget *textdiv = new WContainerWidget(root());
textdiv->setStyleClass("text");
new WText("You can use WMessageBox for simple modal dialog boxes. <br />",
textdiv);
WContainerWidget *buttons = new WContainerWidget(root());
buttons->setStyleClass("buttons");
WPushButton *button;
button = new WPushButton("Familiar", buttons);
button->clicked().connect(SLOT(this, DialogExample::custom));
textdiv = new WContainerWidget(root());
textdiv->setStyleClass("text");
status_ = new WText("Go ahead...", textdiv);
styleSheet().addRule(".buttons",
"padding: 5px;");
styleSheet().addRule(".buttons BUTTON",
"padding-left: 4px; padding-right: 4px;"
"margin-top: 4px; display: block");
styleSheet().addRule(".text", "padding: 4px 8px");
if (environment().agentIsIE())
styleSheet().addRule("body", "margin: 0px;"); // avoid scrollbar problems
}
void DialogExample::custom()
{
WDialog dialog("Personalia");
new WText("Enter your name: ", dialog.contents());
WLineEdit edit(dialog.contents());
new WBreak(dialog.contents());
WPushButton ok("Ok", dialog.contents());
edit.setFocus();
edit.enterPressed().connect(SLOT(&dialog, WDialog::accept));
ok.clicked().connect(SLOT(&dialog, WDialog::accept));
if (dialog.exec() == WDialog::Accepted) {
setStatus("Welcome, " + edit.text());
}
}
void DialogExample::setStatus(const WString& result)
{
status_->setText(result);
}
WApplication *createApplication(const WEnvironment& env)
{
return new DialogExample(env);
}
int main(int argc, char **argv)
{
return WRun(argc, argv, &createApplication);
}
// This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef DIALOG_EXAMPLE_H_
#define DIALOG_EXAMPLE_H_
#include <Wt/WApplication>
#include <Wt/WMessageBox>
using namespace Wt;
/**
* \defgroup dialog Dialog example
*/
/*...@{*/
/*! \brief An example illustrating usage of Dialogs
*/
class DialogExample : public WApplication
{
public:
/*! \brief Create the example application.
*/
DialogExample(const WEnvironment& env);
private:
void messageBox1();
void messageBox2();
void messageBox3();
void messageBox4();
void custom();
void messageBoxDone(StandardButton result);
void setStatus(const WString& text);
WMessageBox *messageBox_;
WText *status_;
};
/*...@}*/
#endif // DIALOGEXAMPLE_H_
firebug:
http://192.168.1.142/examples/DialogExample/DialogExample.wt?wtd=eNfmUzJOJHLO1No9&rand=6180
header:
Date Fri, 25 Sep 2009 12:27:28 GMT
Server Apache/2.2.9 (Ubuntu) mod_fastcgi/2.4.6 PHP/5.2.6-2ubuntu4.3 with
Suhosin-Patch
Vary Accept-Encoding
Content-Encoding gzip
Content-Length 443
Connection close
Content-Type text/html; charset=iso-8859-1
Request Headers
Host 192.168.1.142
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14)
Gecko/2009091010 Iceweasel/3.0.14 (Debian-3.0.14-1)
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Content-Type application/x-www-form-urlencoded; charset=UTF-8;
Referer http://192.168.1.142/examples/DialogExample/DialogExample.wt
Content-Length 238
Response
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
webmas...@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.2.9 (Ubuntu) mod_fastcgi/2.4.6 PHP/5.2.6-2ubuntu4.3 with
Suhosin-Patch Server at 192.168.1.142 Port 80</address>
</body></html>
/var/log/apache2/error.log
[Fri Sep 25 14:27:58 2009] [error] [client 192.168.1.98] FastCGI: comm with
server "/var/www/examples/DialogExample/DialogExample.wt" aborted: idle timeout
(30 sec), referer: http://192.168.1.142/examples/DialogExample/DialogExample.wt
[2009-Sep-25 14:27:58.884521] 7255 - [error] "Error reading from web server"
[Fri Sep 25 14:27:58 2009] [error] [client 192.168.1.98] FastCGI: incomplete
headers (0 bytes) received from server
"/var/www/examples/DialogExample/DialogExample.wt", referer:
http://192.168.1.142/examples/DialogExample/DialogExample.wt
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest