Author Topic: Notice in backend media  (Read 256 times)

Offline dbs

  • Betatester
  • **
  • Posts: 6976
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Notice in backend media
« on: September 05, 2017, 10:31:07 AM »
Hello,

i moved a SP7 installation from Server A (PHP5.6) to Server B (PHP7).
Now every visit in backend of media tab (or a folder inside) produce a notice.
Quote
[E_NOTICE] /admin/media\/parameters.php:[27] from /admin/media/parameters.php:[34] __unserialize \"unserialize(): Error at offset 65528 of 65535 bytes\""

Should SP7 better used with PHP5.6?

Cheers Frank

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4662
  • Gender: Male
    • Jacobi22
Re: Notice in backend media
« Reply #1 on: September 05, 2017, 10:37:06 AM »
looks for me like a oversized datas for the media settings or corrupted datas . can you check the media settings and save it again?
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline dbs

  • Betatester
  • **
  • Posts: 6976
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Notice in backend media
« Reply #2 on: September 05, 2017, 10:41:53 AM »
No entrys in settings. Have saved. Notice stays the same.
edit: folder size is 368mb, many images

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4662
  • Gender: Male
    • Jacobi22
Re: Notice in backend media
« Reply #3 on: September 05, 2017, 11:15:06 AM »
the size of the folder has nothing to do with this. the media settings are stored in the database as serialized string in table "settings" / field "mediasettings". if you dont set any settings there in the past, this field is empty.
type of this field is TEXT with a size limit of 64k. the error message means (in simple words) that the size of the stored datas for this serialized string is bigger than the size of the data field. (possible, if you use a lot of subfolders in media) the script get not all datas from this string and doesnt found the end, because of that, its not possible to use the unserialize-function
also possible: a open element for the serialized string, but no ending element - the same effect - the function doesnt found the end of this string - like corupted datas

and if its not possible, to work with this function unserialize, the media-settings in the backend are empty. maybe you can check this field directly in your database or in the backup-sql-file
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline dbs

  • Betatester
  • **
  • Posts: 6976
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
[solved] Re: Notice in backend media
« Reply #4 on: September 05, 2017, 11:30:06 AM »
That's the right direction.
The field in db is full of entrys. Notepad count 65.536 signs.
The last signs: a:2:{s:5:"width";i:0;s:6:"heig

Now the field is empty. No notices to see. 

Thanks, solved.  :-)  (Y)

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4662
  • Gender: Male
    • Jacobi22
Re: Notice in backend media
« Reply #5 on: September 05, 2017, 11:49:33 AM »
the problem is (for me): if i work with 100 subfolders of media, doesnt matter in which structure, and i set my own settings for one folder only, the script write the settings for all folders and not for the only one i use
maybe, its possible to change the size of the field in settings-table with a new field-type, but that's a job for the developers, to think about this. 64k are a lot of datas, but what can i do, if i need this for my project? a folder-limit? not in 2017.....

i'll add a ticket for that, maybe it give's a simple solution
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline dbs

  • Betatester
  • **
  • Posts: 6976
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Notice in backend media
« Reply #6 on: September 05, 2017, 12:13:33 PM »
There are many folders inside of the 'problem folder'.
Possible i had before long time set a width of 1000. But my last view in the settings shows no entry.
The entrys in the db was all from this folder and his subfolders.

The recursive settings are a good idea i think. So you have not do the same work for all subfolders.
If a (sub)folder have a own dimension, then this should have effect.
I'm sure i have openend a ticket for this feature. I do not know this function is currently in SP7. :-)
But it's right, it's a developer thing.

Offline jacobi22

  • Global Moderator
  • *****
  • Posts: 4662
  • Gender: Male
    • Jacobi22
Re: Notice in backend media
« Reply #7 on: September 05, 2017, 12:50:49 PM »
we tested recursive settings in the beginning of the WB 2.10-Test's, but i think, it was for pages only (not sure)
i add a ticket for that and hope for a better solution in the future

recursive is not bad, but you have to read and compare the old settings, so that you not overwrite some possible different settings in a subfolder at the end of the list
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)

Offline DarkViper

  • Core Development
  • *****
  • Posts: 2889
  • Gender: Female
Re: Notice in backend media
« Reply #8 on: September 07, 2017, 09:25:41 AM »
I've looked at media management and I am not surprised that there are problems here.
The system may still have been sufficient 10 years ago. However, with today's data volumes, it is hopelessly overwhelmed.
The critical points are:
  • The de- / serialization of arrays requires a lot of memory and a lot of computing time.
  • By serializing the data to be stored, quantity is more than doubled.
  • The storage in the table 'settings' is unfortunately chosen, because this table is intended for settings but not for a growing data stock.
I'm going to make me the problem in the next few days. A safe and sustainable solution should not be difficult to implement.

Manuela
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"You have to take the men as they are ... but you can not leave them like that !!" :-P
Ein einziger Buchstabendreher kann einen ganzen Satz urinieren.

Offline crnogorac081

  • Posts: 1848
  • Gender: Male
Re: Notice in backend media
« Reply #9 on: September 07, 2017, 01:34:16 PM »
Manuella,

I guess that we should only save exceptions in db for files/folders that are set to be resized. That way we will save processing time and memory.

no bb in signature