Hello,
I have modified 'upgrade.php' to add a new field to the 'sitedetails' database table. I have used the '_db_field_exists' function to make sure the field doesn't already exists, and that works fine. I then call '_db_add_field' to add the field.
In order to test that just this bit works I stripped out all the numerical upgrade functions ('upgrade_1', 'upgrade_2' etc) except the one I want to run. However, the call to '_db_add_field' always seems to fail.
I have modified the PHP file further to check that the DB connection is okay (it is), and that the prepare statement is okay (it is). It is the 'execute' statement which fails. What is worse is that it fails with an error code of 00000!
I am somewhat stumped with this. It is part of a pull request waiting to be pushed to github, but I am slightly loathe to do that without having tested it. I have googled about this, but can find nothing to explain what might be wrong.
I have tried running a full upgrade but that fails with creating the config table (again error 0). I have disabled the local iptables firewall and SELinux (it's running on a Linux server), but neither made any difference. I have checked the server logs, the Apache and mariadb logs and found nothing useful.
If I run the mysql statement ('alter table... add column...') by hand using the Xerte database userid, then it works fine.
Anyone any ideas about this?
Thanks.