I'm not sure yet what's causing this PHP problem, but it does not occur under WikiNDX4.
The attached image contains two separate error messages. The top part shows the initial error, and clicking "OK" makes it go away, whereupon the second error, lower part of image, comes up and requires 7 clicks to go away. After entering all the required data, the entry is saved correctly.
However, it also appears to me that the displayed fields for a "Web Encyclopedia" resource are incorrect. There should be an accessed date?
Is this problem related to missing plugins for resource types, or some other non-server reason? In my config.php, I have not excluded any resource types.
FIXED
I've fixed this ON MY SYSTEM in the config.php by setting WIKINDX_DB_PERSISTENT to FALSE. However, if you have extension=/your/path/zlib.so in your php.ini, you will get a new error stating zlib is already loaded. My php.ini has zlib commented out and I only use two non-standard MacOS extensions:
The problem is directly related to selecting a resource type.
Everything is fine when I use Resources -> New, which defaults to 'Book'. I can enter all the relevant data, select categories etc., and save.
However, if I click on any other Resource Type, the error occurs. Because of the error, the page does not refresh with the resource options pertinent to the selected resource type. This explains the reason for my asking about the Access date.
In my PHP error log I get the following entries, which align with the clicks I mentioned earlier above.
The MySQL config is unique and the auth performed once by script in Wikindx. Failing here, is failing everywhere. Check your config.
Everything else is working, and I've rechecked my 'config.php', see attached file. I have also tried setting WIKINDX_PATH_AUTO_DETECTION from TRUE to FALSE (and manually setting the URL and PATH). I even modified SQL.php (123 & 2731) to set my password before the call to mysqli_connect.
And did you have defined read only access in MyQL for this bibmaster user, off chance?
The WikiNDX user has all privileges on the WikiNDX database except "Grant".
I've discovered that this problem was introduced when I migrated from 5.1 to 6.08. So resource type selection works with 4.2.2 and 5.1, but doesn't work in 6.0.8, 6.3.4 and 6.3.7.
I checked this in our fresh (6.3.4) install in our lab, which I showed to Mark, and the problem exists there as well.
I've discovered the culprit in SQL.php. Lines 122 and 2730 cause the error when $dbpers is TRUE (i.e. a persistent connection is to be established). "localhost" is prepended with "p:" becoming "p:localhost".
This causes the error on both my systems; the one I run at home using the mysql indicated above, and the latest MariaDB in our lab. Removing the "p:" makes the error go away and the page works fine.
I've fixed it in the config.php by setting WIKINDX_DB_PERSISTENT to FALSE. However, if you have extension=/your/path/zlib.so in your php.ini, you will get a new error stating zlib is already loaded. My php.ini has zlib commented out and I only use two non-standard MacOS extensions:
I'll leave Stéphane to answer the question about zlib. I have WIKINDX_DB_PERSISTENT = TRUE on both my localhost development wikindx and two online servers including https://testdrive.wikindx.com/index.php
Everything works fine changing resource types as you've been trying. Perhaps your issue is somewhere else – security and firewalls or perhaps both your DB servers simply don't like/allow persistent connections?
Regards,
Mark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Persistent connection is arcane stuff and should not be used without being experienced. Naf's error is clear. bibmaster user is misconfigured or misused.
2020-07-28T01:50:43.418699+10:00 2282 [Note] Access denied for user 'bibmaster'@'localhost' (using password: NO)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[WikiNDX 6.3.7]
I'm not sure yet what's causing this PHP problem, but it does not occur under WikiNDX4.
The attached image contains two separate error messages. The top part shows the initial error, and clicking "OK" makes it go away, whereupon the second error, lower part of image, comes up and requires 7 clicks to go away. After entering all the required data, the entry is saved correctly.
However, it also appears to me that the displayed fields for a "Web Encyclopedia" resource are incorrect. There should be an accessed date?
Is this problem related to missing plugins for resource types, or some other non-server reason? In my config.php, I have not excluded any resource types.
FIXED
I've fixed this ON MY SYSTEM in the config.php by setting
WIKINDX_DB_PERSISTENT
to FALSE. However, if you haveextension=/your/path/zlib.so
in your php.ini, you will get a new error stating zlib is already loaded. My php.ini has zlib commented out and I only use two non-standard MacOS extensions:Last edit: Nap 2020-07-28
Plugins are not required. You have errors want the app talk to MySQL. What is the version of PHP, MySQL/Mariadb?
Apache 2.4.43 (Homebrew),, mysql Ver 14.14 Distrib 5.7.20, for macos10.12 (x86_64) using EditLine wrapper,PHP Version 7.3.11.
Because it was very late in the evening, I haven't tried debugging this yet, and have not even checked the error logs.
Hi Nap,
Access date is found under Miscellaneous Details.
Regards,
Mark
Last edit: Mark Grimshaw 2020-07-27
This error is not specific to Wikindx.
Please check this solution:
https://stackoverflow.com/questions/39480988/error-received-error-57-socket-is-not-connected-ios-10
If this does not work there must be a problem with the configuration of the MySQL server or the mode of dialogue with it.
The problem is directly related to selecting a resource type.
Everything is fine when I use
Resources -> New
, which defaults to 'Book'. I can enter all the relevant data, select categories etc., and save.However, if I click on any other Resource Type, the error occurs. Because of the error, the page does not refresh with the resource options pertinent to the selected resource type. This explains the reason for my asking about the
Access
date.In my PHP error log I get the following entries, which align with the clicks I mentioned earlier above.
I have all the resource types
Active
in theAdmin -> Configure -> Resources
combo box (none deactivated).The MySQL config is unique and the auth performed once by script in Wikindx. Failing here, is failing everywhere. Check your config.
And did you have defined read only access in MyQL for this bibmaster user, off chance?
Last edit: Stéphane Aulery 2020-07-27
Everything else is working, and I've rechecked my 'config.php', see attached file. I have also tried setting
WIKINDX_PATH_AUTO_DETECTION
from TRUE to FALSE (and manually setting the URL and PATH). I even modified SQL.php (123 & 2731) to set my password before the call tomysqli_connect
.The WikiNDX user has all privileges on the WikiNDX database except "Grant".
I've discovered that this problem was introduced when I migrated from 5.1 to 6.08. So resource type selection works with 4.2.2 and 5.1, but doesn't work in 6.0.8, 6.3.4 and 6.3.7.
I checked this in our fresh (6.3.4) install in our lab, which I showed to Mark, and the problem exists there as well.
Last edit: Nap 2020-07-28
I've discovered the culprit in SQL.php. Lines 122 and 2730 cause the error when
$dbpers
is TRUE (i.e. a persistent connection is to be established). "localhost" is prepended with "p:" becoming "p:localhost".This causes the error on both my systems; the one I run at home using the mysql indicated above, and the latest MariaDB in our lab. Removing the "p:" makes the error go away and the page works fine.
I've fixed it in the config.php by setting
WIKINDX_DB_PERSISTENT
to FALSE. However, if you haveextension=/your/path/zlib.so
in your php.ini, you will get a new error stating zlib is already loaded. My php.ini has zlib commented out and I only use two non-standard MacOS extensions:Last edit: Nap 2020-07-28
PHP applications are not responsible of extension loading. The PHP installation is.
We provide the persistent option but this option should be used in rare case by for very specific configuration of MySQL. Never use it.
If you have intermediary backup you can restart the migration from 5.1 and be sure that all is fine.
Hi Nap,
I'll leave Stéphane to answer the question about zlib. I have WIKINDX_DB_PERSISTENT = TRUE on both my localhost development wikindx and two online servers including https://testdrive.wikindx.com/index.php
Everything works fine changing resource types as you've been trying. Perhaps your issue is somewhere else – security and firewalls or perhaps both your DB servers simply don't like/allow persistent connections?
Regards,
Mark
Persistent connection is arcane stuff and should not be used without being experienced. Naf's error is clear. bibmaster user is misconfigured or misused.
2020-07-28T01:50:43.418699+10:00 2282 [Note] Access denied for user 'bibmaster'@'localhost' (using password: NO)
If you don't mind, I'm going to park the issue here for now as its working fine in 6.3.7 on both machines.
Thanks for your help, as usual!! :)
If it works, it's already good.