PHP routeros_api.class not works in linux

Hello
I try code in Windows and its work normally
I upload it to Linux server , when I call code via browser when I put IP server its didn’t run, while if I connect SSH to server and call it from terminal, its work normally.
I try to change PEAR2 file chmod to 777 and same issue.
Regards.