Jump to content

MariaDB issues and v5.5.2.72


reed0427

Recommended Posts

We have phpVMS 5.5.2.72 installed. When the MariaDB update came along recently (it was updated from 10.1 to 10.2), we lost a lot of our admin functions, and since then we have not been able to do any updates to our schedule, etc.

 

Can you explain more about how this MariaDB update affected v5.5.2.72, and what is being done to correct it? Not being able to update our schedules, etc, is a real problem.

 

David Reed

President, Historic Airline Group

Link to comment
Share on other sites

  • 4 weeks later...

This is a known problem, it is to do with strict mode. There is a temporary fix I found to work is for all INSERT you need to put INSERT IGNORE instead that seems to work, but it is not a long term fix. Unfortunately because the version of phpvms you are using is old, the code is coded for older databases and php versions, and would require a pretty much complete rewrite of the code to get it to work with strict mode. You can either ask your host to downgrade to an older version of MariaDB or get a VPS or dedicate where you have control over the db version. But it is going to be harder and harder to find hosts that dont have older DB versions now.

Link to comment
Share on other sites

  • 6 months later...

It is both code and database structure related, unfortunately enough phpvms classic series fails on both :( Which makes fixes harder.

 

In simple terms;

  • Sending empty strings in sql queries is not possible (and not logical at all) with Strict Mode enabled (a server side setting, can not be disabled at user level and for this reasons hosting companies may simply deny any requests about it).
  • Database structure should be ok for having "null" (empty) values for fields, if that field is not necessary or mandatory.

So, what is happening at the moment with @ProAvia's v5.5.2.7.2 (and maybe all other older versions) is, for example when you try to insert a schedule manually;

 

1. Code (the backend code of phpvms) tries to send empty strings as field values (Not possible with Strict Mode)

2. Database itself is not configured to have "null" (empty) values for non-mandatory fields (Like the notes of a schedule, or the say for example the route or route_details fields)

 

When you fix the code to not pass empty strings as field values, you hit the database side 'cause it waits for a value.

 

Using INSERT IGNORE alone may be a solution as @Strider mentioned, even for long term it can be used. Or both code and database structure needs to be renewed. Of course it will take more time compared to just adding IGNORE to some statements but I think it would be the best way to handle it.

 

https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict 

(Similar problems arise when MariaDB is being used, it may have different name in settings but it also has a Strict Mode logic pretty much the same others use)

 

And another problem is, even if some crazy men fixes the core code of 5.5.2.7.2, make it compatible with latest php editions and database engines, there is a big risk about the addons around, if their code is not updated (or not properly written in the first place) may stop working and braking va functionality too.

 

Anyway, just for fun and curiosity, I just fixed the manual schedule inserting problems and made 5.5.2.7.2 work with newer php versions but how can we go further I am not sure ;) Considering it is way too old and too customized it may even not worth the effort for a complete overhaul at all.

Link to comment
Share on other sites

PHPVMS 5.5.2.7.2 is out dated and would require a near complete rewrite of the code to get it to work correctly with newer php versions and db structures. If someone is willing to spend the time doing so, god speed to ya. But since phpvms V7 is in the works that will negate the need to rewrite the code of the older version, no real need to spend the time doing it. Time would be better spent making addons for the new version. If you have a VPS or dedicated you can turn off strict mode yourself if you know what you are doing. Most addons can be fairly quickly and easily be updated to newer code the problem comes if the addon is more entwined into the core code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...