Unable to save any hours worked:
Log:
2012-05-14 17:23:17 ** ERROR ** ERROR **
2012-05-14 17:23:17 ** ERROR ** on file '/var/www/localhost/htdocs/projectorria/tool/saveImputation.php' at line (32)
2012-05-14 17:23:17 ** ERROR ***** cause = Undefined offset: 27
Confirmed.
Bug Registered as Ticket #681 : high priority.
Hi,
I think it not high but critical because there is no way around and tool is useless without that...
Regards,
Evgueni
It is !
I am investigating.
I could not reproduce locally but could on Demo site.
So I copied Demo database locally ... and could not reproduce :huh: .
Strange. :silly:
I continue ...
Fixing is in two steps.
First, replace line 32 in /tool/saveImputation.php
$line->leftWork=Work::convertImputation($_REQUEST['leftWork'][$i]);
with
if (isset($_REQUEST['leftWork'][$i])) {
$line->leftWork=Work::convertImputation($_REQUEST['leftWork'][$i]);
}
This should fix most cases.
Then, you may face a server limit, limiting size of request.
You must then update your php.ini file, to include :
max_input_vars = 2000 suhosin.post.max_vars = 2000 suhosin.request.max_vars = 2000
If you cannot update your php.ini (mutualised server), you may either add a simple php.ini file including just these 3 lines in tool directory, or write the equivalent (check syntax) in a .htaccess file with syntax
php_value max_input_vars 2000 php_value suhosin.post.max_vars 2000 php_value suhosin.request.max_vars 2000
Thanks - first step been enough to fix it.
Regards,
Evgueni
Sorry - we got another error now:
2012-05-16 09:23:11 ** ERROR ** cause = Undefined index: workValue_7
2012-05-16 10:58:48 ** ERROR ** ERROR **
2012-05-16 10:58:48 ** ERROR ** on file '/var/www/localhost/htdocs/project
orria/tool/saveImputation.php' at line (43)
2012-05-16 10:58:48 ** ERROR ***** cause = Undefined index: workValue_7
Regards,
Evgueni
It was expected : see step 2 (you must change some server parameters)
This is due to limitations in the number of variables posted on the form.
PHP V5.3.9 introduces this new limitation (but it may have existed before through suhosin) to 1000 vars in a form.
All the applicative imporvements have been done to limit number of variables.
Then, either you succed to change the settings.
Either you must take car to limit the number of lines of assignement for one resource.
(maybe the project breakdown is much too detailed).
We have done that and now we are getting this alerts:
$user->id,'readFlag'=>'0', 'idle'=>'0'); $alert=new Alert(); $lst=$alert->getSqlElementsFromCriteria($crit, false, null, 'id asc'); if (count($lst)==0) { return; } $date=date('Y-m-d H:i:s'); foreach($lst as $alert) { if ($alert->alertDateTimetitle) . ''; echo '
'; echo $alert->message; echo ''; echo ''; return; } }
remind me in
mn
Regards,
Evgueni
Where do you get this alert ?
(a print screen ?)
No, on any projectorria screen (and for every user)
We have done that
Done what exactly ?
and now we are getting this alerts:
$user->id,'readFlag'=>'0', 'idle'=>'0'); $alert=new Alert(); $lst=$alert->getSqlElementsFromCriteria($crit, false, null, 'id asc'); if (count($lst)==0) { return; } $date=date('Y-m-d H:i:s'); foreach($lst as $alert) { if ($alert->alertDateTimetitle) . ''; echo '
'; echo $alert->message; echo ''; echo ''; return; } }
I d'ont understand what you mean : this is some PHP code, you should never see this on your screen.
check what you did, you probably broke some php configuration.
We did exactly what you suggested:
max_input_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000
Regards,
Evgueni
Interesting that even if we roll back this changes we still getting this alerts... unless i clean the cache
We did exactly what you suggested:
max_input_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000
OK, but where ?
and how did you do it ?