Forum

Unable to save any ...
 
Notifications
Clear all

Unable to save any hours worked

16 Posts
2 Users
0 Reactions
14.6 K Views
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 
[#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


 
Posted : 15 May 2012 10H48
(@babynus)
Posts: 14952
Member Admin
 

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


 
Posted : 15 May 2012 11H42
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

Hi,

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


 
Posted : 15 May 2012 12H11
(@babynus)
Posts: 14952
Member 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 ...


 
Posted : 15 May 2012 12H35
(@babynus)
Posts: 14952
Member 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

 
Posted : 15 May 2012 17H12
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

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


 
Posted : 15 May 2012 17H19
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

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


 
Posted : 16 May 2012 14H11
(@babynus)
Posts: 14952
Member 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).


 
Posted : 16 May 2012 14H24
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

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


 
Posted : 16 May 2012 15H07
(@babynus)
Posts: 14952
Member Admin
 

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


 
Posted : 16 May 2012 15H31
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

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


 
Posted : 16 May 2012 15H32
(@babynus)
Posts: 14952
Member 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.


 
Posted : 16 May 2012 15H38
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

We did exactly what you suggested:

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


 
Posted : 16 May 2012 16H16
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

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


 
Posted : 16 May 2012 16H21
(@babynus)
Posts: 14952
Member 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 ?


 
Posted : 16 May 2012 16H30
Evgueni Kolossov
(@ekolossov)
Posts: 566
Contributor
Topic starter
 

/etc/php/apache2-php5.3/php.ini

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000
max_input_vars = 2000
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 2000

we have done it again and no alerts coming...


 
Posted : 16 May 2012 16H35
Share:

Scroll to Top