Forum

Error in log since ...
 
Notifications
Retirer tout

Error in log since migrated to V4.4

13 Posts
2 Utilisateurs
0 Reactions
15.3 {numéro}K Vu
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 
[#1937]

Since I upgrade Projeqtor to V4.4 the two following lines are registered in the log file (one time at at each connection) :
2014-08-06 16:22:34 ** ERROR ** on file '••••••••••••••••••/projeqtor/model/Audit.php' at line (169)
2014-08-06 16:22:34 ** ERROR ** cause = Cannot modify header information - headers already sent by (output started at ••••••••••••••••••/projeqtor/model/WorkElement.php:352)
(•••••••••••••••••• defines the main path in the system)
I know that the 2nd msg is reported when trying to send header after data other than header are sent, I guess that is caused by a minor bug in the changes of V4.4.


 
Posté : 6 Août PM 19:088
(@babynus)
Posts: 14952
Membre Admin
 

Strange I cannot reproduce.
In fact, there should be some unexpected "echo" (possibly some remaining debug tracing), but I cannot fond where.
As this error should appear dureing disconnection, could you figure out on which screen you are when you get this log and how you disconnect ?


 
Posté : 6 Août PM 19:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

These messages are logged at deconnection, regardless the screen I leave (main, project, parameter, etc.). Always the same.

No apparent dysfunction at work, I discovered that casually, when opening a log file for another reason.


 
Posté : 6 Août PM 21:088
(@babynus)
Posts: 14952
Membre Admin
 

Didn't you change some code and introduce some "echo" for debugging purpose ?


 
Posté : 6 Août PM 21:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

None as that. Changes concerns only columns in tables (new and some size changes) and display in ./models (plus enforceUTF8 and acceptance of 'text' format).

The log error occurs even when I connect with only displaying the main screen and disconnect at once without doing anything !

Ah, also some changes in lang.js (values added and some corrections as true apostrophes in normal text), but these changes where already done in previous version without log error.


 
Posté : 7 Août AM 11:088
(@babynus)
Posts: 14952
Membre Admin
 

Hi,

It is strange to get this last error only once a day... (unless you use the "remember me function")
It confirms that setting header comes too late...

As I don't reproduce, I'm almost sure it come from one of your changes.
It is very difficult to find such issues because it can be due just to some space or line break before a <?php tag.
This sends some data to the buffer, and it is then impossible to modify headers.

It is for instance possible that you introduced some caracters before the <?php tag in the parameters.php file.
As you get this issue on connection and on disconnection whatever the actual page, I would suspect some change in a php file very frequently userd (parameters.php, projeqtor.ph, html.php,...)

I woukd recommend :
1) try with community version without any change to confirm this does not occur with community version
2) re-apply you changes
3) identify all changed code and seach for extra data out of


 
Posté : 7 Août AM 11:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

Hi,

It is strange to get this last error only once a day... (unless you use the "remember me function")
It confirms that setting header comes too late...

I deleted that info while you were replying, in fact that was wrong : that occured only one time, yesterday. Not today.

As I don't reproduce, I'm almost sure it come from one of your changes.
It is very difficult to find such issues because it can be due just to some space or line break before a <?php tag.
This sends some data to the buffer, and it is then impossible to modify headers.

It is for instance possible that you introduced some caracters before the <?php tag in the parameters.php file.
As you get this issue on connection and on disconnection whatever the actual page, I would suspect some change in a php file very frequently userd (parameters.php, projeqtor.ph, html.php,...)

NOTHING has be changed out of php area !
And changed files are :
./model/persistence/Sql.php => only to comment condition to have enforceUTF8 active.
./view/objectDetail.php => to allow 'text' and 'mediumtext' (already made in june !) as shown in another topic.
… and the following for new data and internationalization. No new change since upgrade to 4.4:
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Client.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/ClientType.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Contact.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Context.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/ContextType.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/PaymentType.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Project.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/ProjectType.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Resource.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/RiskLevel.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/Type.php
/dossiers/internet/www_blary_eu/t4e/projeqtor/model/User.php

I woukd recommend :
1) try with community version without any change to confirm this does not occur with community version

… I tried with original 'model' files, still occurs !
But I can’t remove updates in database. May be something in data added in migration ?
May be also a relation between these error messages and non-working "enforceUTF8" ?


 
Posté : 7 Août PM 12:088
(@babynus)
Posts: 14952
Membre Admin
 

I deleted that info while you were replying, in fact that was wrong : that occured only one time, yesterday. Not today.

Still more weird

NOTHING has be changed out of php area !

Issue is in PHP area for sure.
The more suspicious ones are the one used on every page. In your list I would suspect :
Sql.php
User.php
andpossibly Project.php

… I tried with original 'model' files, still occurs !

So the one you set back to original should not be suspected.

But I can’t remove updates in database. May be something in data added in migration ?

I really don't thing this may be due to data. Forget this way.

May be also a relation between these error messages and non-working "enforceUTF8" ?

Yes.
And I then sucpect your parameters.php file.
Could you post it here or send it to support@projeqtor.org (after hiding information about your database cnnection) ?


 
Posté : 7 Août PM 13:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

I have copied the whole application (files + database) on company server, with all changes.

1. No error registered on log on disconnection (nor connection). So changes on Php code are not responsible.

2. 'enforceUTF8' still dont work!

3. Disappeared contacts from project screen advised in other topic for v4.3.2 are now displayed (v.4.4).

So the 2. is the unique anomaly on the company server!


 
Posté : 7 Août PM 19:088
(@babynus)
Posts: 14952
Membre Admin
 

Hi,
I have noticed some strangfe behavior of session_start(), generating 6 spaces.
I cannot explain where they come from.
Fixed it with an ob_clean after session_start.


 
Posté : 8 Août AM 02:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

Fixed it with an ob_clean after session_start.

No, the errors messages still come… (and now with error in apache log due to that ob_clean, as advised in another topic).


 
Posté : 13 Août PM 20:088
(@babynus)
Posts: 14952
Membre Admin
 

I think I finaly found the issue. :woohoo:

In /model/workElement.php, remove all caracters (line break and spaces) after ending ?>
Then you can also remove ob_clean after session_start in /tool/projeqtor.php

All should be right now.
Please confirm :pinch:


 
Posté : 13 Août PM 21:088
(@jean-luc)
Posts: 73
Active Member
Début du sujet
 

Yes, 8 blank characters were there. Removed.
=> No more error msg in projeqtor log. 🙂
ob_clean commented => No more error in apache log. 🙂
I confirm that's all right. 😛

But I suggest you :
a) to use a good text editor (at least one offering an option "remove trailing spaces when save", which avoid these waste blanks). Mine is Komodo Edit – free and available on Windows, Mac & Linux, and which have also a very good real-time syntax checker (and also a completion system) for a lot of programming languages.
b) Standardize all source files with same indent mode, as we found now spaces here, tabs there… Almost text editors allowing to define spacing value for tabs, I suggest to define it on 4 and use exclusively tabs to indent (global replace [4 spaces] by tab does the job. 😉 )


 
Posté : 14 Août AM 10:088
Share:
Retour en haut