PROBLEM SOLVED!

there was a default ruleset running for mod_security that I have to
admit I do not know lots about.

disabling it has shown it to be the problem so now I just need to re-
enable it and dig into learning how that all works.

Many thanks for the help guys.

cheers
BREWER


On Nov 3, 4:30 pm, Tonu Tusk <[email protected]> wrote:
> OK, so I put everything back to "normal" in my cake app. and ran
> through the problematic procedure again to get some log readouts.
>
> Live HTTP Headers firefox plugin gives me the following related to the
> call
>
> http://XXXX.com/stock/addUnits/8
>
> GET /stock/addUnits/8 HTTP/1.1
>
> Host: XXXX.com
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.15)
> Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
> *;q=0.8
>
> Accept-Language: en-gb,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
>
> Referer:http://XXXX.com/stock/admin
>
> Cookie: CAKEPHP=XXXX
>
> HTTP/1.x 200 OK
>
> Date: Tue, 03 Nov 2009 16:02:23 GMT
>
> Server: Apache
>
> X-Powered-By: PHP/5.2.9
>
> P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
>
> Set-Cookie: CAKEPHP=XXXX expires=Tue, 10-Nov-2009 16:02:32 GMT; path=/
>
> Set-Cookie: CAKEPHP=XXXX expires=Tue, 10-Nov-2009 16:02:32 GMT; path=/
>
> Vary: Accept-Encoding
>
> Content-Encoding: gzip
>
> Keep-Alive: timeout=2, max=99
>
> Connection: Keep-Alive
>
> Transfer-Encoding: chunked
>
> Content-Type: text/html
>
> ----------------------------------------------------------
>
> http://XXXX.com/bugs
>
> POST /bugs HTTP/1.1
>
> Host: XXXX.com
>
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.15)
> Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15
>
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/
> *;q=0.8
>
> Accept-Language: en-gb,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
>
> Referer:http://XXXX.com/stock/addUnits/8
>
> Cookie: CAKEPHP=XXXX
>
> Content-Type: application/x-www-form-urlencoded
>
> Content-Length: 76674
>
> post data omitted
> HTTP/1.x 200 OK
>
> The bottom line of my apache access log is...
>
> XXX.XXX.XXX.XXX - - [03/Nov/2009:08:02:23 -0800] "GET /stock/addUnits/
> 8 HTTP/1.1" 200 22799 "http://XXXX.com/stock/admin"; "Mozilla/5.0 (X11;
> U; Linux x86_64; en-GB; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04
> (jaunty) Firefox/3.0.15"
>
> but there is no sign of apache receiving the POST request.
>
> I have also tried the same actions in Opera, and it is showing me
> "Error - connection closed by remote server"
>
> as I say, it is just strange because I can post the exact data to a
> php script that lives outside the mod_rewrite / cake app but on the
> same server
> and I can post the data to a cake install living on a different
> hosting site, but posting to a cake app installed on dreamhost (and I
> have tried on 2 seaprate hosting spaces on 2 separate servers)
> just bombs out like this.
>
> as you can see, the post data is ~ 77k and I have checked it to be
> intact, although it has '[' and ']' encoded as %5B and %5D
> There are around 500 input  boxes and 1500 hidden values in the form -
> is this too many?
> Is 77kb post size too large and is there any way that  the char
> encoding or Doctypes could be messing with this?
>
> Any more suggestions before I start shouting at Dreamhost?
>
> cheers
> BREWER
>
> On Nov 3, 11:51 am, John Andersen <[email protected]> wrote:
>
> > Is the environment at your production site and your development site
> > the same?
>
> > Could you create a dummy application, with only the problematic form/
> > view, and test it?
>
> > If the issue is still there, can you provide the dummy application or
> > the view for us to test?
>
> > Enjoy,
> >    John
>
> > On Nov 3, 1:45 pm, Tonu Tusk <[email protected]> wrote:
>
> > > OK - if this also helps anyone to offer any suggestions, here is what
> > > I have just done.
>
> > > 1) generated a smaller (tested working) form with what seems to be
> > > acceptable to cake
> > > 2) Altered the main index.php entry file to just echo a message and
> > > then exit
> > > 3) uploaded this to the site
> > > 4) Posted the generated form from step  1)
> > > 5) This corrcetly used the altered index file to display the message I
> > > have set
>
> > > 6) Revert the index.php file back to how it was to enable cake to work
> > > 7) Generated a large problematic form
> > > 8) Uploaded the revised index.php with just the echo message and exit
> > > command
> > > 9) Post the form from step 7)
> > > 10) White screen - i.e this does not seem to even be accessing
> > > index.php !
>
> > > I guess this then suggests that it is a mod_rewrite / apache issue,
> > > but hard to track down as it is
> > > the shared host that I need to be running production on and so will be
> > > hard (and maybe pointless) to try and
> > > replicate this on my dev server.
>
> > > Could the doctype affect the way that apache / mod_rewrite module
> > > handles this?
>
> > > As mentioned in an earlier post, I can setup a target for the
> > > problematic  post data  that just vardumps the post variable and that
> > > is handled on the same server (but outside of the cake htaccess
> > > jurasdiction) and this works fine.
>
> > > Any more insight would be helpful.
>
> > > cheers
> > > BREWER
>
> > > On Nov 2, 9:52 pm, Tonu Tusk <[email protected]> wrote:
>
> > > > I also set the upload_max_filesize and post_max_size to 128M
> > > > and the available memory size to 256M
>
> > > > Probably not going to make the shared host happy, but phpinfo is
> > > > reporting these values as having been set.
>
> > > > It's a mystery.
>
> > > > I am going to try and replicate the problem on a clean install to try
> > > > and track it down.
>
> > > > On Nov 2, 7:52 pm, Dragos Chiriac <[email protected]> wrote:
>
> > > > >http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody
> > > > > upload_max_filesize and post_max_size in your php.ini file.
> > > > > Each name/value is limited to 1024 characters, if the form type is not
> > > > > multipart.
> > > > > Also look at memory size available for script ... the default 16M is 
> > > > > not
> > > > > enough, as cake itself uses about 6-9 of them for a not very complex
> > > > > app. Notice that on certain distros the ini files for cli and apache
> > > > > module are different, and that you need to restart apache after every
> > > > > change. I suppose you use apache.
> > > > > Also notice that certain browsers (cough, ie, cough) , in my 
> > > > > experience,
> > > > > have a hard time and break your post data if using many inputs and not
> > > > > setting a multipart form.
>
> > > > > Considering WSOD, is probably to have with your server (apache)
> > > > > settings. Can you try to post the form to a simple php that's <?
> > > > > print_r($_POST) ?>ing the form data ?, with reporting E_ALL ?
>
> > > > > #tail -f the error.log file of the server to see realtime what's the
> > > > > server saying about your attempt.
>
> > > > > Dragos
>
> > > > > Tonu Tusk wrote:
> > > > > > Hi, This is going to sounds a bit vague to start with, but I 
> > > > > > basically
> > > > > > have a form that has a lot of input boxes in it
> > > > > > ( > 500 text input boxes) and when this is posting back to the
> > > > > > controller I get the WSOD.
>
> > > > > > I have turned off all of my actual processing code in my controller
> > > > > > and it did all work with a smaller number of input boxes, but now it
> > > > > > just white screens.
>
> > > > > > As I mentioned, rewriting the controller code to just not even touch
> > > > > > the POSTed data but just to show some indication of status does not
> > > > > > affect things, there should be no (or next to no) processing of this
> > > > > > going on, but the controller definitely still works with exactly the
> > > > > > same code generating the forms, just a fewer number of inputs in the
> > > > > > form.
>
> > > > > > I have altered my php settings from 8M post memory to 128M as well 
> > > > > > as
> > > > > > massively upping the memory allowed for
> > > > > > php scripts but still white screen.
>
> > > > > > I don't know where to start I have tried chainging index.php in the
> > > > > > main entry call between generting the form and
> > > > > > posting it anywhere but again, I am just getting a whitescreen.
>
> > > > > > Any help at all to point me where to look next would be welcome. If 
> > > > > > I
> > > > > > can't debug cake then it will be a good couple of months work down 
> > > > > > the
> > > > > > pan and I'll have to choose another option for framework etc as I
> > > > > > can't waste any more time on bumbling around blindly.
>
> > > > > > thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to