Bug? Large article creates Error 500 - cannot save

This forum is for reporting bugs in Joomla!. Please don't report problems with extensions in here.
robYardo
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Feb 29, 2008 1:58 am
Location: Santa Fe, NM
Contact:

Re: Bug? Large article creates Error 500 - cannot save

Post by robYardo » Tue Oct 27, 2009 5:09 pm

binglis wrote:I encountered the smae problem.

I fixed it by adding a line to the .htaccess file:

# Should mod_security inspect POST payloads
SecFilterScanPOST Off

That fixed its little red wagon... that leavedsthe security thingy still working, but it no longer searches the Post string..
After adding this to .htaccess does apache need to be restarted?

binglis
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 29, 2009 11:27 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by binglis » Tue Oct 27, 2009 10:15 pm

No. pacahe does not need to be restarted

the .htaccess file is read in each directory on the fly. so this allows you to modify apache settings without restarting apache. it also alows you to have different settings per directory acording to .htaccess files. (directorys inherit the settings of their parent.

there is an overhead involved in doing it this way, but it is convinient. especialy when you do not have access to the apache config file.

nakhoa
Joomla! Intern
Joomla! Intern
Posts: 64
Joined: Thu Jul 30, 2009 7:02 am

Re: Bug? Large article creates Error 500 - cannot save

Post by nakhoa » Wed Apr 07, 2010 2:03 pm

I also cannot save the articles and here is the error I got

500 - An error has occurred!

DB function failed with error number 2006
MySQL server has gone away SQL=UPDATE `jos_content` SET `title`='Những điều đàn ông luôn giữ kín',`alias`='nhung-dieu-dan-ong-luon-giu-kin',`introtext`='......

And another

jtablesession::store failed
DB function failed with error number 2006
MySQL server has gone away SQL=INSERT INTO jos_session ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'c39b2d016011ec2ac998c81a9bb54879','1270651807','','0','1','1' )

I just disable the mod_security by .htaccess. I did open the max_allowed_packet to 64M but all cannot solve my problem. I can't save any article; even it is huge or not. I don't know what happens please help.

If cannot saving any articles; the site will become death :(

Many thanks for any advices

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: Bug? Large article creates Error 500 - cannot save

Post by mcsmom » Thu Apr 08, 2010 7:10 pm

This sounds like really different issue. Please start a different thread.
http://dev.mysql.com/doc/refman/5.1/en/gone-away.html

Is your server working otherwise? Can you see already saved content?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

angelesb
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Mar 22, 2010 3:19 am

Re: Bug? Large article creates Error 500 - cannot save

Post by angelesb » Sat Apr 24, 2010 4:08 pm

AHLJOOMLA wrote:I spent some time looking for a solution and noted a post about having the words "Select" or "From" in your article you were trying to post. I did not have "From" but had the word "Selecting" 3 or 4 times. I changed "Selecting" to "Choosing" and the article was suddenly able to publish in full length.

Before doing anything technical, try to search the article for these words and replace them with alternatives. I am not proficient in PHP and mysql so I don't know why this occurs, I only know what I did to resolve it.
I removed the word "from" in my article and it was finally saved!!! but this makes no sense! i need the word "from"!

skate323k137
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu May 20, 2010 12:52 am

Re: Bug? Large article creates Error 500 - cannot save

Post by skate323k137 » Thu May 20, 2010 4:42 am

ircmaxell wrote:Hence, why I think mod_security is a useless peace of trash...
WRONG. mod_security, when used properly, stops all sorts of code injections among other things. It's downright stupid to not use it unless your code just plain sucks and/or you don't care. People constantly turn it off instead of bypassing one rule ID. That's what's dumb, not modsec.

People constantly bark up the wrong tree on this. 500 errors, and mod_sec errors are verbosely logged. See my post here:

http://forum.joomla.org/viewtopic.php?f=428&t=485608
skate323k137 wrote:I work for a major web hosting company that hosts tons of joomla, drupal, and wordpress sites. ALL of these CMS'es will trip SQL injection rules in mod_security2. If you get random 500 errors, They're almost always from modsec rule ID 300013 through 300017 (cpanel world anyway).

The above poster was dead on using the locationmatch syntax in the whitelist.conf file. I do this dozens of times a day to "fix" joomla, drupal, and wordpress installs.

These modsec filter(s) deny posts containing words like "DROP, SELECT, GRANT" etc (mysql commands). I'm not sure if there's anything the dev's of these CMS'es could do to avoid this. I usually use the same rule (locationmatch for administrator/index.php for the rule ID in the apache error log) or for wordpress sites, I use something like this:

<locationmatch "/wp-admin/*">
SecRuleRemoveById 300013 300014 300015 300016 300017
</locationmatch>

If you get a 500 error when posting, and don't know how to check the apache log, CALL YOUR HOST. It will take an experienced sysadmin all of five minutes to find the 500 error(s) to your IP, and they'll be verbosely logged. The above syntax can just have the URI and rule ID(s) modified.

The worst you can be looking at is a flash uploader which may not have a rule ID to begin with. Adding a rule ID to it in modsec2.user.conf is easy, just add the "id:1000001" to the end of the line like this:

SecRule HTTP_User-Agent "^Shockwave Flash" "id:1000001"

Then add that ID number to the list in your locationmatch syntax in whitelist.conf. Happy posting!

ginageick
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Thu Apr 06, 2006 8:01 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by ginageick » Tue Jun 08, 2010 11:01 pm

Hah!
I've had a client complaining of this issue.. and have now encountered it myself, with a new project. And, low and behold... changing the word 'selected' or 'select' has allowed me to save the article!

Am forwarding this thread to my server guru - thanks everyone for your input.

Dr JunkeeMaker
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Jun 23, 2010 9:06 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by Dr JunkeeMaker » Wed Jun 23, 2010 11:49 pm

my situation is slightly different, only when i post JUST an image to an article do i get this error
although my error only says
"500 - an error has occured DB function reports no errors"
nothing more
i have had my host up the max_allowed_size to 16m
the function suhosin in php.ini is disabled
but i still get this problem
help!!!!! plz

skate323k137
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu May 20, 2010 12:52 am

Re: Bug? Large article creates Error 500 - cannot save

Post by skate323k137 » Wed Jun 23, 2010 11:57 pm

do you have shell access? if so, tail -f /path/to/apache/logs/error_log, and see what happens when you try to post. Very few 500's aren't solvable using the apache error log. If its a really busy server, you may want to pipe your tail command, something like #tail -f /path/to/apache/logs/error_log | grep youripaddresshere

is it a flash uploader? modsec can block those depending on the ruleset.

Dr JunkeeMaker
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed Jun 23, 2010 9:06 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by Dr JunkeeMaker » Thu Jun 24, 2010 12:03 am

i dont have shell access and its not a flash uploader

skate323k137
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Thu May 20, 2010 12:52 am

Re: Bug? Large article creates Error 500 - cannot save

Post by skate323k137 » Thu Jun 24, 2010 12:27 am

Do you have any way to obtain the recent apache logs? support team, sftp access, anything? Your answer most likely lies therein...

erictiggeler
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Apr 07, 2010 6:18 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by erictiggeler » Thu Jul 01, 2010 7:49 pm

I encountered the same problems (saving large articles created Internal Server Error 500) in Joomla 1.6 Beta 4. The solution binglis gives, however, works like a charm:
I encountered the smae problem.

I fixed it by adding a line to the .htaccess file:

# Should mod_security inspect POST payloads
SecFilterScanPOST Off

That fixed its little red wagon... that leavedsthe security thingy still working, but it no longer searches the Post string..
So it seems (as far as I understand it) this is not a Joomla bug, but a server issue. Moreover, it's relatively easy to solve.
Eric Tiggeler
http://www.joomm.net

sitewonders
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 171
Joined: Mon Mar 19, 2007 8:29 am

Re: Bug? Large article creates Error 500 - cannot save

Post by sitewonders » Sat Oct 23, 2010 9:25 am

Hi all.

I have this same problem.

I have 20+ Joomla Sites on my server all working fine.

I recently installed a new site and have been working on it, but I cant save any articles, no matter what they contains, I just get a 500 error page.

I am using Joomla 1.5.21

If I turn debug on I get

500 - An error has occurred!

exception 'BadMethodCallException' with message 'Call to undefined method :getParams' in /home/tora/public_html/libraries/koowa/object/object.php:267 Stack trace: #0 /home/tora/public_html/libraries/koowa/pattern/decorator.php(214): KObject->__call('getParams', Array) #1 [internal function]: KPatternDecorator->__call('getParams', Array) #2 /home/tora/public_html/components/com_virtuemart/virtuemart_parser.php(80): KDecoratorJoomlaApplication->getParams() #3 /home/tora/public_html/plugins/content/vmproductsnapshots.php(42): require_once('/home/tora/publ...') #4 /home/tora/public_html/libraries/joomla/plugin/helper.php(133): require_once('/home/tora/publ...') #5 /home/tora/public_html/libraries/joomla/plugin/helper.php(97): JPluginHelper->_import(Object(stdClass), true, NULL) #6 /home/tora/public_html/administrator/components/com_content/controller.php(469): JPluginHelper->importPlugin('content') #7 /home/tora/public_html/administrator/components/com_content/admin.content.php(51): ContentController->saveContent() #8 /home/tora/public_html/libraries/joomla/application/component/helper.php(162): require_once('/home/tora/publ...') #9 /home/tora/public_html/administrator/includes/application.php(136): JComponentHelper->renderComponent('com_content') #10 /home/tora/public_html/libraries/koowa/decorator/joomla/application.php(107): JAdministrator->dispatch('com_content') #11 /home/tora/public_html/administrator/index.php(67): KDecoratorJoomlaApplication->dispatch('com_content') #12 {main}

Call stack
# Function Location
1 KDecoratorJoomlaApplication->dispatch() /home/tora/public_html/administrator/index.php:67
2 JAdministrator->dispatch() /home/tora/public_html/libraries/koowa/decorator/joomla/application.php:107
3 JComponentHelper->renderComponent() /home/tora/public_html/administrator/includes/application.php:136
4 require_once() /home/tora/public_html/libraries/joomla/application/component/helper.php:162
5 ContentController->saveContent() /home/tora/public_html/administrator/components/com_content/admin.content.php:51
6 JPluginHelper->importPlugin() /home/tora/public_html/administrator/components/com_content/controller.php:469
7 JPluginHelper->_import() /home/tora/public_html/libraries/joomla/plugin/helper.php:97
8 require_once() /home/tora/public_html/libraries/joomla/plugin/helper.php:133
9 require_once() /home/tora/public_html/plugins/content/vmproductsnapshots.php:42
10 KDecoratorJoomlaApplication->getParams() /home/tora/public_html/components/com_virtuemart/virtuemart_parser.php:80
11 KPatternDecorator->__call()
12 KObject->__call() /home/tora/public_html/libraries/koowa/pattern/decorator.php:214

Can any of you advise? This problem is really holding me up.

Thanks in advance, I really appreciate it.

Gary

sitewonders
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 171
Joined: Mon Mar 19, 2007 8:29 am

Re: Bug? Large article creates Error 500 - cannot save

Post by sitewonders » Sat Oct 23, 2010 9:34 am

PROBLEM SOLVED.

I had K2 and Koowa installed but wasnt using them. I removed them and now everything works.

< Happy Bunny!

larrusseric
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Feb 19, 2010 5:03 am

Re: Bug? Large article creates Error 500 - cannot save

Post by larrusseric » Wed Nov 10, 2010 9:53 am

i'm trying to embed a [youtube] video on a article,
the video seems to be working before clicking the apply/save button..
then after hitting the apply/save button, 500 error appears..
i'm not launching the site yet,
i use xammp and it's not uploaded in a localhost yet..
i wan't to fix this bug first before i upload this website..
thanks..

here's the screenshot of the error after hitting apply/save button

Image

User avatar
mcsmom
Joomla! Exemplar
Joomla! Exemplar
Posts: 7985
Joined: Thu Aug 18, 2005 8:43 pm
Location: New York
Contact:

Re: Bug? Large article creates Error 500 - cannot save

Post by mcsmom » Wed Nov 10, 2010 10:03 am

Do you have error reporting on maximum? It would be helpful to see full details.
A [youtube] embed is not the same problem since that is not about large size.

What kind of menu link do you have for the home link?
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.

chuck-hill
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Wed May 06, 2009 12:54 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by chuck-hill » Tue Nov 16, 2010 9:44 pm

Dr JunkeeMaker wrote:my situation is slightly different, only when i post JUST an image to an article do i get this error
although my error only says
"500 - an error has occured DB function reports no errors"
nothing more
i have had my host up the max_allowed_size to 16m
the function suhosin in php.ini is disabled
but i still get this problem
help!!!!! plz
I had the same problem just as you described with the images and I just solved it, or at least it appears to be solved. Go to your article manager and click on "Parameters" and scroll down to the filter groups. In there select everyone but the Admin and Super Admin and then select "Blacklist (Default)". Save those settings. After I did that there has been no Server Error 500.

flatmattj
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Wed Sep 22, 2010 10:21 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by flatmattj » Sun Sep 18, 2011 10:37 pm

I encountered this error when I switched servers and found the issue I had on my server.

After reviewing the logs I discovered the issue
was with Mod_Sec. I whitelisted rule 30016 and it now works great.

It is not safe to disable the security as mentioned earlier in this post - this should do the trick for you.

Since this was the only post I could find on this issue, I thought I'd share that with anybody experiencing this issue.

Xantec
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 18, 2011 8:24 pm

Re: Bug? Large article creates Error 500 - cannot save

Post by Xantec » Tue Oct 18, 2011 8:39 pm

Hi everyone,

I know this is an older post but I thought I throw in my own experience with this matter.

I had the same issue not being able to save an article. The article wasn't large nor had any special formatting in it, plain old text.

It drove me crazy as it was our client's Joomla website we had created and they weren't able to edit their article.

After reading this post and previous readings on mod_security issues I was looking for the word "select" in the article. It turns out it only had the word "selected" in it and by changing the word to something other e.g. "chosen" it resolved the issue for good.

We are a PHP developing company specializing in HTML form & SQL security. Now who the flip came up with mod_security? Only accept valid data + mysql_real_escape_string() takes care of that problem.

Thanks for the post. It saved me some of my initial headache ;)


Locked

Return to “Joomla! 1.5 Bug Reporting”