PHP Warnings and Notices in server error log
Virtual Research Environment / On-line Bibliography Manager
Brought to you by:
sirfragalot
There are other PHP messages in my server error logs, which are repeated again and again (I list them in an arbitrary order). Some of them are related to the basket:
PHP Warning: A non-numeric value encountered in /var/www/wikindx5/core/bibcitation/BIBFORMAT.php on line 736
Fixed - PHP Warning: A non-numeric value encountered in /var/www/wikindx5/core/bibcitation/BIBFORMAT.php on line 511
Fixed - PHP Warning: array_key_exists() expects parameter 2 to be array, bool given in /var/www/wikindx5/core/modules/resource/RESOURCEVIEW.php on line 1007
Fixed - PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /var/www/wikindx5/core/modules/basket/BASKET.php on line 98
Fixed - PHP Warning: join(): Invalid arguments passed in /var/www/wikindx5/core/modules/browse/BROWSECOLLECTION.php on line 95
Fixed - PHP Notice: Undefined index: resourceId in /var/www/wikindx5/core/modules/basket/BASKET.php on line 56
Fixed - PHP Notice: Undefined index: id in /var/www/wikindx5/core/modules/resource/RESOURCEVIEW.php on line 88
Fixed - PHP message: PHP Warning: join(): Invalid arguments passed in /var/www/wikindx5/core/modules/browse/BROWSECOLLECTION.php on line 95
Fixed - PHP Notice: Undefined index: collectionType in /var/www/wikindx5/core/modules/browse/BROWSECOLLECTION.php on line 65
Joachim
hi Joachim,
Which version of PHP do you have?
Mark
PHP 7.3
Hi Mark and Stéphane,
with SVN trunk r2810 in place (on my test server, clicking on a publisher link in the details view, I get
Weird is, that this happens only with a certain publisher, many others I tried don't have this problem …
On my production server with SVN stable 2802, the same publisher is OK.
Best
Joachim
HI Joachim,
SQL
Is it possible to see the entire SQL statement by turning on print SQL statements in Configure?
Mark
Phew, this message is unlikely. This would mean that the mbstring package or extension (depending on the system) is not installed. Very unlikely except if it is a new installation.
Hi Stéphane,
you might be correct. php7.3-mbstring is installed. This message is an old one and occured only twice some weeks ago. Might be that was from a time when I switched from Debian 9 to 10 and had to fiddle with PHP packages. I think we can ignore that for now.
Best
Joachim
--
Dr. Joachim Trinkwitz
Institut für Germanistik, Vergleichende Literatur- und Kulturwissenschaft der Universität Bonn
53012 Bonn
Tel.: 0228-737565
www.germanistik.uni-bonn.de
www.comicforschung.uni-bonn.de
Last edit: Stéphane Aulery 2019-08-27
Ok I remove it.
I fixed this warning:
Hi Joachim,
I fixed all warnings except:
It seems impossible. This code is not reachable if the condition needed to trigger the error is fulfilled because a guard prevents this exact case.
Either this error was found on a previous version of Wikindx or the application was in a particular state, during your PHP migration maybe. If this error does not appear again in the logs I think that it should not be taken into account.
Regards,
Most error messages seems to have vanished with SVN trunk r2825 in place, but just now this one popped up again (I've caught the SQL statement):
Thanks for your work, well done!
Joachim
It's because th e IN clause is malformed (one comma before the first number).
JOIN wkx_users ON usersId = CASE WHEN (resourcemiscEditUserIdResourceIS NOT NULL) THEN (resourcemiscEditUserIdResource) ELSE (resourcemiscAddUserIdResource) END WHERE (resourceIdIN (,1361,1423,1540,1What were you attempting to do Joachim?
Mark
This happens when I click on certain keywords via the details view. The same keyword searched via Advanced Search gives no problem.
Best
Joachim
Last edit: Stéphane Aulery 2019-09-03
Since you have not had another problem for 3 months I consider that the problem is corrected. If there are other errors open a new bug because it is already very long. Thanks.
OK. I can't duplicate it but think I have a fix in place to ensure it does not occur. Can you check please Joachim?
Regards,
Mark
Sorry, same message as before. Could it simply be, that some of my records are in some ways corrupted, missing fields or something like that?
Best
Joachim
Last edit: Stéphane Aulery 2019-09-03
Hi Joachim,
Thanks for your patience on this.
It could be that you have a stored SQL session that needs deleting so first try to log off then on again.
If that doesn't fix it, can you send the URL of the page that causes the problem so that I can see if there is anything unusual?
Regards,
Mark