This is a comment on Cannot refer to uploaded files, posted by coffe1nk at 04.05.2022 14:40

View source for Re: Cannot refer to uploaded files

Hi WikiAdmin,

**did you upgrade or downgrade the wiki?** ---> It's new fresh install ((https://bitbucket.org/wackowiki/wackowiki/get/6.0.25.zip 6.0.25.zip))

I created the database

%%CREATE DATABASE wacko_test CHARACTER SET utf8mb4;
GRANT ALL PRIVILEGES ON wacko_test.* TO 'apps'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;%%

and then followed the install instruction. there is no error except upload file.

%%mysql> desc wacko_file;
+------------------+------------------+------+-----+---------+----------------+
| Field            | Type             | Null | Key | Default | Extra          |
+------------------+------------------+------+-----+---------+----------------+
| file_id          | int unsigned     | NO   | PRI | NULL    | auto_increment |
| page_id          | int unsigned     | NO   | MUL | 0       |                |
| user_id          | int unsigned     | NO   | MUL | 0       |                |
| file_name        | varchar(255)     | NO   |     |         |                |
| file_lang        | varchar(5)       | NO   |     |         |                |
| file_description | varchar(255)     | NO   |     |         |                |
| caption          | text             | NO   |     | NULL    |                |
| author           | varchar(255)     | NO   |     |         |                |
| source           | varchar(255)     | NO   |     |         |                |
| source_url       | varchar(255)     | NO   |     |         |                |
| license_id       | int unsigned     | NO   |     | 0       |                |
| uploaded_dt      | datetime         | YES  |     | NULL    |                |
| modified_dt      | datetime         | YES  |     | NULL    |                |
| file_size        | int unsigned     | NO   |     | 0       |                |
| picture_w        | int unsigned     | NO   |     | 0       |                |
| picture_h        | int unsigned     | NO   |     | 0       |                |
| file_ext         | varchar(10)      | NO   |     |         |                |
| mime_type        | varchar(255)     | NO   |     |         |                |
| deleted          | tinyint unsigned | YES  | MUL | 0       |                |
+------------------+------------------+------+-----+---------+----------------+
19 rows in set (0.00 sec)%%

%%mysql>  SHOW INDEX IN wacko_file;
+------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| Table      | Non_unique | Key_name      | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Visible | Expression |
+------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
| wacko_file |          0 | PRIMARY       |            1 | file_id     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| wacko_file |          0 | idx_page_id   |            1 | page_id     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| wacko_file |          0 | idx_page_id   |            2 | file_name   | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| wacko_file |          1 | idx_page_id_2 |            1 | page_id     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
| wacko_file |          1 | idx_page_id_2 |            2 | uploaded_dt | A         |           0 |     NULL |   NULL | YES  | BTREE      |         |               | YES     | NULL       |
| wacko_file |          1 | idx_deleted   |            1 | deleted     | A         |           0 |     NULL |   NULL | YES  | BTREE      |         |               | YES     | NULL       |
| wacko_file |          1 | idx_user_id   |            1 | user_id     | A         |           0 |     NULL |   NULL |      | BTREE      |         |               | YES     | NULL       |
+------------+------------+---------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+------------+
7 rows in set (0.39 sec)%%

I tried to enable debug mode ##const PHP_ERROR_REPORTING			= 5##

and got this message in the ##/etc/httpd/logs/error_log##

%%[Wed May 04 21:35:01.943156 2022] [php7:notice] [pid 15986] [client 192.168.50.1:18791] PHP Notice:  Trying to access array offset on value of type null in /apps/testapp/wacko_test1/htdocs/handler/page/upload.php on line 298, referer: http://wacko.kmb-note/test?show_files=1
[Wed May 04 21:35:01.943425 2022] [php7:notice] [pid 15986] [client 192.168.50.1:18791] PHP Notice:  Trying to access array offset on value of type null in /apps/testapp/wacko_test1/htdocs/handler/page/upload.php on line 310, referer: http://wacko.kmb-note/test?show_files=1%%

  ((https://i.ibb.co/GdJhWdv/screenshot-129.jpg))

thanks and regards,