Forum

Unable to save any ...
 
Notifications
Retirer tout

Unable to save any hours worked

16 Posts
2 Utilisateurs
0 Reactions
14.6 {numéro}K Vu
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 
[#518]

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


 
Posté : 15 Mai AM 10:055
(@babynus)
Posts: 14952
Membre Admin
 

Confirmed.
Bug Registered as Ticket #681 : high priority.


 
Posté : 15 Mai AM 11:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

Hi,

I think it not high but critical because there is no way around and tool is useless without that...
Regards,
Evgueni


 
Posté : 15 Mai PM 12:055
(@babynus)
Posts: 14952
Membre Admin
 

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 ...


 
Posté : 15 Mai PM 12:055
(@babynus)
Posts: 14952
Membre Admin
 

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

 
Posté : 15 Mai PM 17:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

Thanks - first step been enough to fix it.
Regards,
Evgueni


 
Posté : 15 Mai PM 17:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

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


 
Posté : 16 Mai PM 14:055
(@babynus)
Posts: 14952
Membre Admin
 

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).


 
Posté : 16 Mai PM 14:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

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


 
Posté : 16 Mai PM 15:055
(@babynus)
Posts: 14952
Membre Admin
 

Where do you get this alert ?
(a print screen ?)


 
Posté : 16 Mai PM 15:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

No, on any projectorria screen (and for every user)


 
Posté : 16 Mai PM 15:055
(@babynus)
Posts: 14952
Membre Admin
 

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.


 
Posté : 16 Mai PM 15:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

We did exactly what you suggested:

max_input_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000
Regards,
Evgueni


 
Posté : 16 Mai PM 16:055
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Début du sujet
 

Interesting that even if we roll back this changes we still getting this alerts... unless i clean the cache


 
Posté : 16 Mai PM 16:055
(@babynus)
Posts: 14952
Membre Admin
 

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 ?


 
Posté : 16 Mai PM 16:055
Page 1 / 2
Share:
Retour en haut