Re: ProxySSL/ HTTP-Server + HTML_QuickForm_Controller
| From: | Stefan Neufeind | Date: | Fri, 28 May 2004 23:08:32 +0000 |
| Subject: | Re: ProxySSL/ HTTP-Server + HTML_QuickForm_Controller | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12786@lists.php.net to get a copy of this message | ||
On 29 May 2004 at 0:57, Stefan Neufeind wrote:
> On 29 May 2004 at 0:51, Matthias H. Risse wrote:
>
> > i am using a http-proxy to avoid the
> > necessity to have an own ssl-certificate for
> > each domain.
> >
> > a script which usually resides here:
> > A) --> http://domain.com/quickform.php
> >
> > is called by ssl via this address:
> > B) -->
> > https://http-proxy-server.com/domain.com/quickform.php
> >
> > the renderer produces something like this:
> > <form action="/quickform.php" method="post" name="page1"
> > id="page1">
> > ^^^^^^^^^^^^^^
> >
> > maybe i am blind, but i dont know where to tell the controller
> > (or controller_page?) that it should direct any calls to "itself"
> > to the B)-address, because i need something like this for the request
> >
> > <form
> > action="https://http-proxy-server.com/domain.com/quickform.php"
> >
> > method="post" name="page1" id="page1">
>
> The third parameter of the QuickForm-constructor should help you out -
> it's the form-action:
>
> function HTML_QuickForm($formName='', $method='post',
> $action='',
> $target='_self', $attributes=null)
>
> I don't know about QuickForm_Controller unfortunately.
Sorry for the reply to myself :-)) Just looked it up in
HTML_QuickForm_Controller. There doesn't seem to be a direct
possibility to set the $action-URL like with HTML_QuickForm. So the
default $_SERVER['PHP_SELF'] will be used. And since your proxy is
rewriting the URLs, the script is executed from the webroot of your
non-ssl-virtualhost. But having a look at the HTML_QuickForm-
constructor you'll also notice that there is a function:
$this->updateAttributes($attributes);
$attributes is an array, containing also 'action' => $action. So it
should be possible to update that attribute after creation of a
HTML_QuickForm_Page (which is derived from HTML_QuickForm).
Hope it helps,
Stefan