gkobler
(Gregor Kobler)
1
Hello
I try to made a new installation with Version 11.2.2 on a shared webhoster with PHP8.1.
Everything are ok, but i got an error when i click to the “Admin” button. I got the follow error message
Fatal error: Uncaught Error: Call to undefined function passthru() in /home/xxxx/web/xxxx/public_html/Modules/admin/admin_model.php:485 Stack trace: #0 /home/xxxx/web/xxxx/public_html/Modules/admin/admin_model.php(310): Admin->disk_list() #1 /home/xxxx/web/xxxx/public_html/Modules/admin/admin_model.php(97): Admin->system_information() #2 /home/xxxx/web/xxxx/public_html/Modules/admin/admin_controller.php(77): Admin->full_system_information() #3 /home/xxxx/web/xxxx/public_html/core.php(75): admin_controller() #4 /home/xxxx/web/xxxx/public_html/index.php(242): controller(‘admin’) #5 {main} thrown in /home/xxxx/web/xxxx/public_html/Modules/admin/admin_model.php on line 485
Does somebody has an idea what the cause of this error could be?
Thankfull for any hint
Gregor
mjr
(mjr)
2
Does your shared webhost disable passthru? Do this but search for passthru instead of exec:
gkobler
(Gregor Kobler)
3
Yes it’s disabled 
I’m not sure, the webhoster are willing to enable it. 
mjr
(mjr)
4
Webhoster error. Replace webhoster and try again. 
1 Like
Zarch
(Mick Wall)
5
Ubuntu 22 uses PHP 8.1.2
EmonCMS needs v7.4.3
I’d suggest installing ubuntu 20, not 22.
gkobler
(Gregor Kobler)
7
This is on a shared webhoster not possible. I can change the PHP version to 7.4 and try it again
mjr
(mjr)
8
That’s a different problem, best handled by redirecting the warnings, and downgrading isn’t a long term solution anyway.
gkobler
(Gregor Kobler)
9
My webhoster has enabled passthru
now i can access to the admin sections.
follow error messages appears, but im not sure it’s relevant to me? Or can i ignore them?
Warning: file_exists(): open_basedir restriction in effect. File(/dev/ttyUSB0) is not within the allowed path(s): (/home/xxxx/web/files:/home/xxxx/web/xxxx/public_html:/home/xxxx/web/xxxx/software_data:/home/xxxx/tmp:/home/xxxx/web/xxxx/stats) in /home/xxxx/web/xxxx/public_html/Modules/admin/admin_model.php on line 60
And also an error in the system info
Warning: Undefined array key “total” in /home/xxxx/web/xxxx/public_html/Modules/admin/Views/admin_main_view.php on line 133
Warning: Undefined array key “free” in /home/xxxx/web/xxxx/public_html/Modules/admin/Views/admin_main_view.php on line 135
mjr
(mjr)
10
Those are warnings not errors. The first is complaining it cannot access a USB serial device, which a server wouldn’t have anyway. The others are probably php starting to tighten up on questionable shortcuts in programming.
I think you could switch warnings off in your php.ini without serious problem, or just ignore them until a future emoncms version fixes them.
gkobler
(Gregor Kobler)
11
that’s what I thought, just wanted to be sure. Thanks