Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php 8.1 support #125

Closed
icyz opened this issue May 27, 2022 · 8 comments
Closed

php 8.1 support #125

icyz opened this issue May 27, 2022 · 8 comments

Comments

@icyz
Copy link
Contributor

icyz commented May 27, 2022

hello, I'm trying to use Linfo on PHP 8.1 but there are some problems: the @-operator doesn't work anymore.

thanks, for that cool project! :-)

@jrgp
Copy link
Owner

jrgp commented May 27, 2022

Thanks for letting me know! Glad you like the project

@jrgp
Copy link
Owner

jrgp commented May 27, 2022

I just verified that linfo works out of the box on php 8.1.6 on Fedora 36 (with selinux off).

Can you please paste me the errors you're seeing?

@icyz
Copy link
Contributor Author

icyz commented May 27, 2022

Warning: disk_total_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 682 (error level: 2) Warning: disk_free_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 683 (error level: 2) Warning: disk_total_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 682 (error level: 2) Warning: disk_free_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 683 (error level: 2) Warning: disk_total_space(): No such file or directory in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 682 (error level: 2) Warning: disk_free_space(): No such file or directory in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 683 (error level: 2) Warning: disk_total_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 682 (error level: 2) Warning: disk_free_space(): Permission denied in /var/www/zerogestionale/trunk/zero/public/vendor/linfo/linfo/src/Linfo/OS/Linux.php on line 683 (error level: 2)

in Linux.php :
$size = @disk_total_space($mount[2]);
$free = @disk_free_space($mount[2]);

now the @-operator does not suppress errors anymore.

thanks!

@jrgp
Copy link
Owner

jrgp commented May 28, 2022

I just committed a check which should avoid those errors. Please confirm.

@icyz
Copy link
Contributor Author

icyz commented May 30, 2022

Yes, mate!
I checked and it works like a charm :-)

@jrgp
Copy link
Owner

jrgp commented May 30, 2022

Awesome! Glad it helped.

@jrgp jrgp closed this as completed May 30, 2022
@icyz
Copy link
Contributor Author

icyz commented Jun 17, 2022

did you plan to create a new release? I'm asking for people (like me) using composer :-)
thanks mate!

@jrgp
Copy link
Owner

jrgp commented Jun 18, 2022

Released! https://github.com/jrgp/linfo/releases/tag/v4.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants