"could not save:400 -- bad request -- ",only when I try to save templates

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

"could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

>:(
could not save:400 -- bad request --

suddenly this warning appearing in browser when I try apply e changes, only in templates,( I can modify any other section, pages, ...)

If I try submit then appears, this warning:

"Bad Request Your browser sent a request that this server could not understand."

it doesn't matter which template, even those that I dont change anything and work good, if I try aplly or save always appear that message.

where is the problem and How can it be solved?

Firefox, opera and IE send same problem

I'm using ML version 1.2

in shared server
Last edited by percusionista on Mon Nov 26, 2007 6:56 pm, edited 1 time in total.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by tsw »

and what does the log say?

wild guess, mod_security doesn't like the content
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

and what does the log say?
The only messages I got is what I wrote in first post.

It is strage because if I simply open the template and close it again the message appears again, witout changing anything, simply click on Apply and the message appears.

Any template where I try always the same message
Last edited by percusionista on Mon Nov 26, 2007 10:34 pm, edited 1 time in total.
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote:
and what does the log say?
The only messages I got is what I wrote in first post.

It is strage because if I simply open the template and close it again the message appears again, witout changing anything, simply click on Apply and the message appears.

Any template where I try always the same message
Active debug in config.php and check for error

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

Active debug in config.php and check for error
:-[

I don't know how or what to do.

I search in forums and in google too, but I don´t understand exacty how to do that job.  :'(

newby in PHP need some help  ::)
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote:
Active debug in config.php and check for error
I don't know how or what to do.
In config.php change debug to true:

Code: Select all

.........
$config['debug'] = true;
.........
And check for error [Note: Error(0) is not a error but info]

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

I've changed debug to =true and when I try enter in admin panel appear this message in the screen:
Debug is on. Redirecting disabled... Please click this link to continue.
/ml/admin/login.php
Debug: (4.3000000000015E-05) - (551624)

loading smarty

Debug: (0.0047119999999999) - (788936)

loading adodb

Debug: (0.007814) - (861784)

loading page functions

Debug: (0.011048) - (1012904)

loading content functions

Debug: (0.01398) - (1170920)

loading pageinfo functions

Debug: (0.015131) - (1209864)

loading translation functions

Debug: (0.01604) - (1227544)

loading events functions

Debug: (0.01785) - (1308888)

done loading files

Debug: (0.039796) - (1885856)


(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs
Error (0):

Debug: (0.045178) - (1937856)


(mysql): SELECT * FROM cms_userplugins
Error (0):

Debug: (0.094781) - (2358488)


(mysql): SELECT * FROM cms_modules ORDER BY module_name
Error (0):

Debug display of 'End of include':(0.187429) - (3757880)
Debug: (0.188263) - (3719896)

No session found.  Now check for cookies

Debug: (0.188333) - (3720144)

No cookies found.  Redirect to login.

Debug: (0.309422) - (3768680)


(mysql): SELECT user_id FROM cms_users WHERE username = 'ale' AND password = '202cb962ac59075b964b07152d234b70' AND active = 1 AND admin_access = 1
Error (0):

Debug: (0.343749) - (3770264)


(mysql): SELECT username, password, active, first_name, last_name, admin_access, email FROM cms_users WHERE user_id = '1'
Error (0):

Debug: (0.343967) - (3770448)

Got user by username

Debug: (0.344031) - (3770672)

user Object
(
    [id] => 1
    [username] => ale
    [password] => xxxxxxxxxxxxxxxxx
    [firstname] => Admin
    [lastname] => User
    [email] => my @ email.com
    [active] => 1
    [adminaccess] => 1
)

Debug: (0.344104) - (3771144)

Starting login procedure.  Setting userid so that other pages will pick it up and set a cookie.

Debug: (0.395166) - (3771144)


(mysql): SELECT preference, value FROM cms_userprefs WHERE user_id = '1'
Error (0):

Debug: (0.448314) - (3773112)


(mysql): INSERT INTO cms_adminlog (timestamp, user_id, username, item_id, item_name, action) VALUES (1196163838,'1','ale','1','ale','User Login')
Error (0):

Debug: (0.499331) - (3793928)


(mysql): SELECT eh.tag_name, eh.module_name, e.originator, e.event_name, eh.handler_order, eh.handler_id, eh.removable FROM cms_event_handlers eh
        INNER JOIN cms_events e ON e.event_id = eh.event_id
        ORDER BY eh.handler_order ASC
Error (0):

Debug: (0.51119) - (3798576)


(mysql): SELECT version from cms_version
Error (0):
When I arrive to main page in backend, down all main content appears again a lot of information:
Debug: (5.4999999999999E-05) - (527936)

loading smarty

Debug: (0.004839) - (765256)

loading adodb

Debug: (0.006982) - (838360)

loading page functions

Debug: (0.011253) - (989480)

loading content functions

Debug: (0.01414) - (1147240)

loading pageinfo functions

Debug: (0.015108) - (1186184)

loading translation functions

Debug: (0.015822) - (1203864)

loading events functions

Debug: (0.017487) - (1285208)

done loading files

Debug: (0.039006) - (1862176)


(mysql): SELECT sitepref_name, sitepref_value from cms_siteprefs
Error (0):

Debug: (0.043775) - (1914176)


(mysql): SELECT * FROM cms_userplugins
Error (0):

Debug: (0.081968) - (2334856)


(mysql): SELECT * FROM cms_modules ORDER BY module_name
Error (0):

Debug display of 'End of include':(0.171582) - (3734248)
Debug: (0.171737) - (3686976)

Session found.  Moving on...

Debug: (0.2405) - (4022488)

Session found.  Moving on...

Debug: (1.196331) - (4023968)


(mysql): SELECT preference, value FROM cms_userprefs WHERE user_id = '1'
Error (0):

Debug: (1.196682) - (4025392)

Session found.  Moving on...

Debug: (1.248302) - (4100576)

Session found.  Moving on...

Debug: (1.323732) - (4164816)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.391913) - (4166024)


(mysql): SELECT DISTINCT permission_name FROM cms_user_groups ug INNER JOIN cms_group_perms gp ON gp.group_id = ug.group_id INNER JOIN cms_permissions p ON p.permission_id = gp.permission_id WHERE ug.user_id = '1'
Error (0):

Debug: (1.453614) - (4174960)

Session found.  Moving on...

Debug: (1.45459) - (4175992)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.494453) - (4183840)

Session found.  Moving on...

Debug: (1.494998) - (4184160)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.50469) - (4185104)

Session found.  Moving on...

Debug: (1.505253) - (4185736)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.541809) - (4188184)

Session found.  Moving on...

Debug: (1.542353) - (4188784)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.550645) - (4194704)

Session found.  Moving on...

Debug: (1.551127) - (4195024)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.554999) - (4195824)

Session found.  Moving on...

Debug: (1.555476) - (4196144)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.559605) - (4198168)

Session found.  Moving on...

Debug: (1.562537) - (4198848)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.610771) - (4200480)

Session found.  Moving on...

Debug: (1.611249) - (4201080)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.655859) - (4202056)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.656395) - (4202440)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.656923) - (4202760)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.696729) - (4273480)


(mysql): SELECT htmlblob_id FROM cms_additional_htmlblob_users WHERE user_id = '1'
Error (0):

Debug: (1.70623) - (4274928)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.752648) - (4274688)


(mysql): SELECT content_id FROM cms_content WHERE owner_id = '1'
Error (0):

Debug: (1.783716) - (4275464)


(mysql): SELECT user_id,content_id FROM cms_additional_users
Error (0):

Debug: (1.784626) - (4277112)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.785275) - (4277488)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.785747) - (4277864)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.786197) - (4278240)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.786652) - (4278616)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.787086) - (4278992)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.78754) - (4279368)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.78799) - (4279744)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.78851) - (4280120)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.78896) - (4280496)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.789415) - (4280872)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.789876) - (4281248)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.790318) - (4281624)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.790756) - (4282032)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.791247) - (4282408)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.791703) - (4282784)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.792177) - (4283176)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.792895) - (4283584)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.793344) - (4284008)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.793809) - (4284448)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.794283) - (4284936)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.794777) - (4285344)


(mysql): SELECT ug.user_id FROM cms_user_groups ug
                    WHERE ug.user_id = '1' AND ug.group_id = 1
Error (0):

Debug: (1.836795) - (4371352)


(mysql): SELECT bookmark_id, user_id, title, url FROM cms_admin_bookmarks WHERE user_id = '1' ORDER BY title
Error (0):

Debug: (1.872158) - (4359496)


(mysql): SELECT version from cms_version
Error (0):

Debug: (1.872962) - (4360384)


(mysql): SELECT bookmark_id, user_id, title, url FROM cms_admin_bookmarks WHERE user_id = '1' ORDER BY title
Error (0):

and now, what does it mean?  :-\
Last edited by percusionista on Tue Nov 27, 2007 11:58 am, edited 1 time in total.
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote: I've changed debug to =true and when I try enter in admin panel appear this message in the screen:
Not with login but when it happens your error

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

I did it now in that way:

open to edit a template, with config.php in false;

change config.php debug  to true;

Click on Apply and only pop up with "could not save:400 -- bad request -- " No other information

if I click on Submit then appears in browser a message:" Bad Request Your browser sent a request that this server could not understand."

only if I go back to templates page then appears all that list of messages but all with Errors (0)


:::::::::: WARNING  :::::::::::

Must be something of my hosting or DataBase ,I have yhem both with www.aruba.it

I'm starting with CMSMS for learning how to adapt static to CMS, with two sites at same time, one of them is this with ML and other in a complete different folder with different DataBase in the standard way (monolingual) and suddenly I realizaed the same kind of problem with the standard one.

same problem in a 2 totally different sites, it seems clear to me

Now the problem is to know what the hell is happening in hosting for asking the solution.
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote: :::::::::: WARNING  :::::::::::

Must be something of my hosting or DataBase ,I have yhem both with www.aruba.it

I'm starting with CMSMS for learning how to adapt static to CMS, with two sites at same time, one of them is this with ML and other in a complete different folder with different DataBase in the standard way (monolingual) and suddenly I realizaed the same kind of problem with the standard one.

same problem in a 2 totally different sites, it seems clear to me

Now the problem is to know what the hell is happening in hosting for asking the solution.
When it happen, login in http://www.yoursite.com/login and check server logs

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

I'm now in admin of my web space

those are the options:

test PHP mail()function
This utility sends an e-mail (using PHP script) to the address you specified and displays the source code of this script

test PHP - phpinfo()
Test PHP functionality viewing information on PHP. Useful also in case you need some detailed information on PHP settings

test CGI
This test consist of a simple PERL script showing some information as a result.

show error log
This tool enables you to view the last part of your Webhosting error log.

repair script permissions
This tool checks directory permissions of your Website and sets them to the correct values.

I have tried with Show error one and appear the next message:
[Tue Nov 27 14:06:51 2007] [error] [client 84.79.16.105] PHP Fatal error:  Allowed memory size of 12582912 bytes exhausted (tried to allocate 349528 bytes) in /web/htdocs/www.percusioncreativa.com/home/simple/m ... nusoap.php on line 6219, referer: http://lnx.percusioncreativa.com/simple ... urletter=F

[Tue Nov 27 14:06:51 2007] [error] [client 84.79.16.105] Allowed memory size of 12582912 bytes exhausted (tried to allocate 209 bytes), referer: http://lnx.percusioncreativa.com/simple ... urletter=F

[Tue Nov 27 14:07:24 2007] [error] [client 84.79.16.105] File does not exist: /web/htdocs/www.percusioncreativa.com/home/simple/m ... angs/es.js, referer: http://lnx.percusioncreativa.com/simple ... d=15&page=

[Tue Nov 27 14:07:25 2007] [error] [client 84.79.16.105] File does not exist: /web/htdocs/www.percusioncreativa.com/home/simple/m ... angs/es.js, referer: http://lnx.percusioncreativa.com/simple ... d=15&page=
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote:
[Tue Nov 27 14:06:51 2007] [error] [client 84.79.16.105] PHP Fatal error:  Allowed memory size of 12582912 bytes exhausted (tried to allocate 349528 bytes) in /web/htdocs/www.percusioncreativa.com/home/simple/m ... nusoap.php on line 6219, referer: http://lnx.percusioncreativa.com/simple ... urletter=F

[Tue Nov 27 14:06:51 2007] [error] [client 84.79.16.105] Allowed memory size of 12582912 bytes exhausted (tried to allocate 209 bytes), referer: http://lnx.percusioncreativa.com/simple ... urletter=F
Search in forum for memory_limit and set to 16M

Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

This  PHP limit  I have alrready ask for the host company and they told me it was not possible. :'(  extrange but true.

It gave me problem when I try install some modules.

The problem now for me is that I cannot edit templates.

Is possible that memory limit create this problem (template modification)?

I´m confused and worried because I could not make File Back up because I could not install this module, and now converting static to CMS is in progression.

It stuck my job.
Last edited by percusionista on Tue Nov 27, 2007 2:31 pm, edited 1 time in total.
alby

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by alby »

percusionista wrote: This  PHP limit  I have alrready ask for the host company and they told me it was not possible. :'(  extrange but true.
:D

In config.php put:

Code: Select all

ini_set('memory_limit', '16M');
Alby
percusionista
Forum Members
Forum Members
Posts: 55
Joined: Thu Nov 15, 2007 12:42 pm

Re: "could not save:400 -- bad request -- ",only when I try to save templates

Post by percusionista »

YES YES YES
ini_set('memory_limit', '16M');
WOW!!!!! it works great, thank you so much.

a simple line of code like that has broken PHP memory limitation.

And cheaper than upgrade option the hosting prpose me! !!!


Now I only have the problem that cannot change templates, only warnig appearing.

What can it be?
Locked

Return to “[locked] CMSMS MLE fork”