anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

PHP 7.4 incompatible with uploading media #145

Closed rcrath closed 3 years ago

rcrath commented 3 years ago

Receive the following problems with deprecated curly braces in php 7.4 on a system that was running fine on pghp 5.6 previously. Do I just need to downgrade to 7.2? Working on reclaim hosting. perhaps related #91

A PHP Error was encountered 
Severity: 8192 
Message- Array and string offset access syntax with curly braces is deprecated 
Filename: amazon-s3-php-class/S3.php 
Line Numberl 2574

Will replacing curly braces with something in the s3.php file be a quick fix?

Also do I ne3ed to change both of these?

$ find -iname s3.php
./public_html/scalar/system/application/libraries/amazon-s3-php-class/S3.php
./public_html/scalar/system/application/libraries/Scalar/Storage/Adapter/S3.php
rcrath commented 3 years ago

actually, I probably do not have write access to these.

rcrath commented 3 years ago

It seems like anything with curly braces fails.

also, saving from dashboard/sharing fails as follows:

A PHP Error was encountered
Severity: 8192

Message: Array and string offset access syntax with curly braces is deprecated

Filename: amazon-s3-php-class/S3.php

Line Number: 2574

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/udigixne/public_html/scalar/system/core/Exceptions.php:186)

Filename: controllers/system.php

Line Number: 473
rcrath commented 3 years ago

downgrading to PHP 7.2 fixes it for now.

rcrath commented 3 years ago

fixed for now by downgrade to 7.2 It is the curly braces and also happens in other contexts, generally file operations like upload and save it seems.

craigdietrich commented 3 years ago

Hi @rcrath

Thanks for finding this!

Curious, are you using AWS? Odd that that AWS S3 file is being loaded in if you aren't.

arthurian commented 3 years ago

@rcrath FYI the S3 error you were encountering should be resolved now that #147 has been merged.

eloyer commented 3 years ago

@rcrath Yes @arthurian is correct, however we recommend waiting to update until we issue an official release (likely within the next week or two) due to other changes we are testing.

craigdietrich commented 3 years ago

Note that there appears to be another PHP 7.4-related problem:

https://github.com/anvc/scalar/issues/148

craigdietrich commented 3 years ago

PHP 7.4 should be a-okay now with our new Release

https://github.com/anvc/scalar/releases/tag/2.5.15