Internal Server Error after submitting a form

Permalink
I have several concrete5 websites hostes at my server. All have the same behaviour. After i restart apache, all return a internal server error after submitting a form (contact form for example).

If i then edit the form (e.g. turn captcha on and off) and save the form, everything is ok until the next time i reload apache.

Form results are saved to database in any case - but the email is only sent if the form works fine. So i suppose the error happens when concrete5 tries to send out the email.

This happens with sites that are running 5.4.1.1 as well as 5.4.2.2.

Any help would be appreciated...


Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.4.6 PHP/5.2.4-2ubuntu5.25 with Suhosin-Patch mod_ruby/1.2.6 Ruby/1.8.6(2007-09-24) mod_ssl/2.2.8 OpenSSL/0.9.8g

View Replies:
jero replied on at Permalink Reply
jero
If you're getting an internal server error, you should see the gory details in the apache error log. Have a look at that and see what it says. /var/log/apache2/error.log is the default location, unless you've specified it manually in your server configuration.
weekender replied on at Permalink Reply
Sorry, forgot to write that i did that and it was not that helpful...

[Tue Jul 10 09:00:33 2012] [error] [client 62.192.26.130] Premature end of script headers: index.php
jero replied on at Permalink Reply
jero
That generally means that something further down the chain has produced a fatal error, but it's got error reporting turned off so you're not seeing anything.

If you turn the mail option off on the form, does it still fail? How about if you leave CAPTCHAs off?

Check that your config/site.php does not have any blank or empty lines in it as this can sometimes cause errors.
weekender replied on at Permalink Reply
Yes - but the php errors are on... So i don't know where to look for to enable error reporting in this case...

I tried with Mail Option off - no problems at all.
Captcha turning off and on has no influence.

So i think the error happens trying to send the E-Mail. It's so strange that it works until apache reloads after i change something on the form and save...

The config/site.php looks like that:

<?php 
define('DB_SERVER', 'localhost');
define('DB_USERNAME', '***');
define('DB_PASSWORD', '***');
define('DB_DATABASE', '***');
define('BASE_URL', 'http://www.smartquotes.ch');
define('DIR_REL', '');
define('PASSWORD_SALT', '***');
define('CACHE_FRONTEND_OPTIONS', serialize(array('automatic_cleaning_factor' => 0)));
define('CACHE_LIBRARY', 'apc');?><?php ?><?php define('DIRNAME_APP_UPDATED', 'concrete5.5.2.1');?>


i just cleaned it up a bit (removed this unnecessary <?php ?> tags and just have one to open the file in the first line). but no luck either.
jero replied on at Permalink Reply
jero
It's likely that something down the line is disabling the error reporting.

If you go to the dashboard, you should be able to see whether you're using Default PHP Mail Functions or External SMTP Server. Does it make a difference if you switch?

If it doesn't, I would consider copying /concrete/helpers/mail.php to /helpers and sticking some debug into that to see where it's breaking
weekender replied on at Permalink Reply
I think something is going wrong with mod_fcgi on the server. Haven't found a solution yet - but i am still trying. If i find a solution i'm gonna post it.

Thank you for your kind help so far jero!
weekender replied on at Permalink Reply
After removing APC as cache handler the error got away.

At least i found a kind of "solution". I'm now a bit unhappy with the page loading times - but prefer a working site to a fast one... :-)