A
A
Andrey Shubnikov2018-05-07 22:04:36
PHP
Andrey Shubnikov, 2018-05-07 22:04:36

How to fix error after ubuntu update?

After updating Ubuntu to version 18.04, this error appeared. On 17.10 everything worked. Do not prompt, in what there can be a problem? The script itself: https://yadi.sk/d/RLaFDg023MtPqN

[email protected] ~ # php /home/convert.php
PHP Warning:  Invalid argument supplied for foreach() in /home/convert.php on line 24
PHP Notice:  Undefined index: General in /home/convert.php on line 34
PHP Notice:  Trying to get property 'Overall_bit_rate' of non-object in /home/convert.php on line 34
PHP Notice:  Undefined index: General in /home/convert.php on line 35
PHP Notice:  Trying to get property 'Duration' of non-object in /home/convert.php on line 35
PHP Notice:  Undefined index: Video in /home/convert.php on line 36
PHP Notice:  Trying to get property 'Width' of non-object in /home/convert.php on line 36
PHP Notice:  Undefined index: Video in /home/convert.php on line 37
PHP Notice:  Trying to get property 'Height' of non-object in /home/convert.php on line 37
PHP Notice:  Undefined index: Video in /home/convert.php on line 38
PHP Notice:  Trying to get property 'Scan_type' of non-object in /home/convert.php on line 38
PHP Notice:  Undefined index: Video in /home/convert.php on line 39
PHP Notice:  Trying to get property 'Frame_rate' of non-object in /home/convert.php on line 39
PHP Notice:  Undefined index: Video in /home/convert.php on line 40
PHP Notice:  Trying to get property 'Original_frame_rate' of non-object in /home/convert.php on line 40
PHP Notice:  Undefined index: Video in /home/convert.php on line 41
PHP Notice:  Trying to get property 'Bit_rate' of non-object in /home/convert.php on line 41
PHP Notice:  Undefined index: Audio in /home/convert.php on line 42
PHP Notice:  Trying to get property 'Bit_rate' of non-object in /home/convert.php on line 42
Start convert file. PID: 8456

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
McBernar, 2018-05-07
@McBernar

Did you turn on the display of notifications in the PHP config, which was turned off earlier?

I
ipokos, 2018-05-07
@ipokos

What comes in foreach on line 24 in convert.php ?

PHP Warning:  Invalid argument supplied for foreach() in /home/convert.php on line 24

R
Roman Mirilaczvili, 2018-05-07
@2ord

Not strong in PHP, but maybe $xml->File->trackit doesn't return an array type?
You need to debug the script line by line.
For help:
php.net/manual/en/simplexml.examples-basic.php
https://stackoverflow.com/questions/15308758/php-t...
It is possible that some necessary library is not loaded during the OS update to work with XML. It needs to be installed from some common standard package or related to PHP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question